I have a Handlebars template which is rendered using a json object. In this json I am sending an array. Like this:
var json = {
"array":["abc","def","ghi","jkl"]
}
Now in my template I want to find the length of this array. Something like:
{{#each item}}
{{ array.length }}
{{/each}}
Couldn't find it in the Handlebars documentation.
My Bad....
{{array.length}}
actually worked inside the template. Should have checked/tested it before posting it here.