I am trying to include an object in an {{each}} iteration in handlebars which doesn't belong to the actual array object.
- myArrayObj <-- array of json objects that include bunch of fields
- someOtherObj <-- json object includes bunch of fields
First attempt:
{{#each myArrayObj}}
{{#myHelper this.fieldInArrayObject someOtherObj.someField}}
{{/myHelper}}
{{/each}}
Helper:
Handlebars.registerHelper('myHelper', function (date, language) { console.log(JSON.stringify(language)); // <--- language is undefined });
someOtherObj.someField is coming out a undefined in the helper class? Everything else is working.
Another example:
{{something.field}} // <--- this works, it displays what I wish
{{#each sessions}}
{{something.field}} // <--- this does not work
{{/each}}