Skip to content

dump ​

Outputs a value as formatted JSON inside an HTML <pre> tag. Use it to see the fields of an object while you build a theme. The tag accepts filters.

liquid
{% dump value %}
  • value: The variable or the expression to output.

Example:

Data
json
{
  "product": {
    "title": "Hat",
    "price": 10,
    "tags": ["summer", "sale"]
  }
}
liquid
{% dump product %}

Output

html
<pre>{
    &quot;title&quot;: &quot;Hat&quot;,
    &quot;price&quot;: 10,
    &quot;tags&quot;: [
        &quot;summer&quot;,
        &quot;sale&quot;
    ]
}</pre>

The browser shows the JSON as text:

json
{
    "title": "Hat",
    "price": 10,
    "tags": [
        "summer",
        "sale"
    ]
}