Use cases

A JSON field can be used to store a set of structured data that you want to display, or to store and inject script configuration etc.

Setup

Example Usage

{% assign json = product.metafields.airf.json %}

{% if json and json != blank %}

   Value by key: {{json['YOUR_KEY']}}

  

   Values by loop:

    {% for key_value in json %}

       {{key_value[0]}}: {{key_value[1]}}

    {% endfor %}

{% endif %}