Actually I'm using "com.github.spullara.mustache.java" but that should not be important. I have array of strings. If I try to render it using just:
{
"codes": {{variable}}
}
then it get rendered
{
"codes": [a, b]
}
which is close to OK. But we are missing apostrophes.
Is there a way how to add those? I tried this:
[{{#codes}}"{{.}}"{{/codes}}]
which is even closer, but misses comma in the middle (darn!)
{
"codes": ["a""b"]
}
and if I add the comma:
[{{#codes}}"{{.}}",{{/codes}}]
there will be (no surprise) extra at the end.
Is there a way how to do that? Changing the input data structure is not an option for me.