My object looks like this:
[\'foo\',\'bar\',\'baz\']
And I want to use a mustache template to produce from it something like this:
I don't think mustache can do this! (surprisingly) You can iterate over a list of objects, and then access the attributes of each object, but you can't seem to iterate over a simple list of values!
So, you have to transform your list into:
[ {"value":"foo"},{"value":"bar"},{"value":"baz"} ]
and then your template would be:
{{#the_list}}
- {{value}}
{{/the_list}}
To me, this seems like a severe problem with Mustache -- any template system should be able to loop over a list of simple values!