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\"
You can define simple helper to handle it:
Handlebars.registerHelper('get_length', function (obj) { return obj.length; });
And then use it in your template eg:
{{get_length some_object}}