Modifier: to_json


Converts any variable into JSON.

stats:
  - player: Luke Skywalker
    score: 750
  - player: Wedge Antilles
    score: 688
  - player: Jar Jar Binks
    score: 1425
{{ stats | to_json }}
[
  {"player":"Luke Skywalker","score":750},
  {"player":"Wedge Antilles","score":688},
  {"player":"Jar Jar Binks","score":1425}
]
Last modified on May 24, 2018