With dot.js template engine how do you loop through an object? In the example data below how do you loop through the "msg" object?
{
"msg": {
"1": {
"a": "a1"
},
"2": {
"b": "b2"
}
}
}
With dot.js template engine how do you loop through an object? In the example data below how do you loop through the "msg" object?
{
"msg": {
"1": {
"a": "a1"
},
"2": {
"b": "b2"
}
}
}
From the example on the website, it looks as if you should be able to do:
However you may want to simplifiy that object a little bit with Javascript first, before passing it to the template in order to make it easier to iterate.