twolfson / reverse-mustache

Reverse templating library for mustache, generating variables from a template's output
The Unlicense
30 stars 6 forks source link

can't obtain array of values #7

Closed mluis closed 6 years ago

mluis commented 6 years ago

Given a template of

{{#places}}{{name}}{{/places}}

I'm obtaining an object. Can't obtain an array of places. Would this be possible?

twolfson commented 6 years ago

I don't think so. The mustache language oversimplifies types a bunch -- this is an example of such a collision. We'd be better off with a language like handlebars. I started exploring that here but abandoned it at a similar time:

https://github.com/twolfson/reverse-template