metafields
The metafields object is dynamic, with its properties determined by the metafield configurations in the SHOPLINE Admin. You can access a specific metafield object by its key. For example, if you have configured a metafield keyed with custom_color in the SHOPLINE Admin, you can access its corresponding object via metafields.custom_color.
Example
The code below demonstrates how to retrieve all metafield objects under the product object.
{{#var metafields = product | get_metafields("demo_ns") /}}
{{{ metafields | json() }}}
{{ metafields.demo_key | get_value() }}
Was this article helpful to you?