Hello,
i have problem, when i want to create new metafield with type json
{
"metafield":{
"key": "house-doctor",
"namespace":"vendors",
"value":"{\"nationality\":null,\"sustainability\":true}",
"type":"json"
}
}
This create new metafield with json, but i can’t manipulate with him in liquid. When i print this value in liquid i see this: {“nationality”:null,“sustainability”:true}. But i can’t use him `
{% assign vendorData = shop.metafields.vendors[ ‘house-doctor’ ] %}`
{{vendorData.sustainability}}.
Old api with value_type works good. When i print value in liquid, looks different: {“nationality”=>nil, “sustainability”=>true}
{
"metafield":{
"key": "house-doctor",
"namespace":"vendors",
"value":"{\"nationality\":null,\"sustainability\":true}",
"value_type":"json_string"
}
}
Does anyone have any advice? I dont want use any hack, etc. script.
Thanks