我的JSON响应值是单引号,但我想要双引号。我已经尝试了JSON.stringify()
和JSON.parse()
,它们都不起作用。
响应:
[
{
title: 'Car',
price: 2323,
}
]
预计回应:
[
{
title: "Car",
price: 2323,
}
]
基本上,我想在Shopify GraphQL查询中使用该响应。
mutation {
productCreate(input: {
id:"gid://shopify/Product/4725894742116"
title: "This is a car",
variants:[{
title:"car",
price: 12
}]
}) {
product {
id
}
}
}