The where helper should create a block that contains all of the items in an array that have a matching key/value. An optional limit can be provided that limits how many items are retrieved. A negative limit will traverse the array in reverse.
<!-- where with minimum arguments: cats age 1 -->
<ul>{{#where cats age 1}}<li>{{name}}</li>{{/where}}</ul>
<!-- where with limit: cats age 8 1 -->
<ul>{{#where cats age 8 1}}<li>{{name}}</li>{{/where}}</ul>
<!-- where with negative limit: cats age 8 -1 -->
<ul>{{#where cats age 8 -1}}<li>{{name}}</li>{{/where}}</ul>
Output
<!-- where with minimum arguments: cats age 1 -->
<ul>
<li>Chip</li>
</ul>
<!-- where with limit: cats age 8 1 -->
<ul>
<li>Wesley</li>
</ul>
<!-- where with negative limit: cats age 8 -1 -->
<ul>
<li>Twizzler</li>
</ul>
The
where
helper should create a block that contains all of the items in an array that have a matching key/value. An optional limit can be provided that limits how many items are retrieved. A negative limit will traverse the array in reverse.cats array
Handlebars
Output