Convert variables to JSON text.
Input
{% assign arr = "foo bar coo" | split: " " %} {{ arr | json }}
Output
["foo","bar","coo"]