json

Convert variables to JSON text.

Input

{% assign arr = "foo bar coo" | split: " " %}
{{ arr | json }}

Output

["foo","bar","coo"]
PDF HTML Epub Powered by Read The Docs