from_json

Table of contents

Does the opposite of to_json:

Provide JSON to the filter and it will return an object with variables.

{% capture json_string %}
  { 
    "id": 1,
    "name": "Joe" 
  }
{% endcapture %}
{% assign test = json_string | from_json %}
{{ test }}
Input
You can now use test.id and test.name in your templating code.

Need help?

Do you have any question which is not answered in this knowledge base? Contact us. We are here to help you.