j2cli
j2cli copied to clipboard
Arrays in json
Hello, I have a problem. When I try to pass an array from a template.json to the dest JSON file the result looks incorrect:
example:
template file:
{ "inpath": ["/2_dir","/3_dir"] }
in the destination file:
{ "paths": ['/2_dir', '/3_dir'] }
I'm about single quote, however, it should be double quotes. So, what do I wrong?
@nickstatka777 This can be accomplished using the tojson
filter like so:
{{ my_array | tojson }}