Discussions
How to Filter Each Array
over 4 years ago by Will Strohl
How would I only show content that matches a specific setting?
For example, in an {{#each Person}} I would like to only include Person with a specific matching attribute, such as Person.Department = DepartmentName.
over 4 years ago by Sacha TrauwaenAdmin
To access a setting from in a each you need to prefix withh ../ to access parent context.
More info : https://handlebarsjs.com/guide/expressions.html#changing-the-context
{{#each Person}}
{{equal Person.Department ../Settings.DepartmentName }} hello {{/equal}}
{{/each}}
ο»Ώ