53
rated 0 times
[
60]
[
7]
/ answers: 1 / hits: 141098
/ 13 Years ago, mon, january 30, 2012, 12:00:00
Is there a Mustache / Handlebars way of looping through an object properties?
So with
var o = {
bob : 'For sure',
roger: 'Unknown',
donkey: 'What an ass'
}
Can I then do something in the template engine that would be equivalent to
for(var prop in o)
{
// with say, prop a variable in the template and value the property value
}
?
More From » iteration