New 'json_string' value type for Metafield object

Shopify Staff
492 42 113

The Metafield object has been updated with a new 'json_string' value type. This makes it easy to store arbitrary structured data within the Shopify platform and access it inside Liquid templates. Notably, when accessing the value of 'json_string' value type metafields, the data is deserialized to an iterable hash or array.


See more examples:


Happy Coding!

Ryan | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Replies 10 (10)
Shopify Partner
12 0 4

This is great news!

Unfortunately, it doesn't seem to work with the bulk editor:


This saves and a string instead of a json_string:

"id": 4090352107572,
"namespace": "json_test",
"key": "json_key",
"value": "[\"one\",\"two\",\"three\"]",
"value_type": "string",
"description": null,
"owner_id": 7266369588,
"created_at": "2018-10-27T08:27:08-07:00",
"updated_at": "2018-10-27T08:27:08-07:00",
"owner_resource": "page"