The after helper returns a new array that excludes the first n elements from the input array. Use it to skip a set number of items from the beginning of a list.
{{after array n}}
-
array (required): The array to slice
-
n (required): The number of items to skip
Return elements after a specific index
{{after record.letters 2}}
Input:
{
"record": {
"letters": ["a", "b", "c", "d"]
}
}
Output:
["c", "d"]
Skip the first item only
{{after record.items 1}}
Input:
{
"record": {
"items": ["apple", "banana", "cherry"]
}
}
Output:
["banana", "cherry"]
Use with iteration
{{#each (after record.tags 3)}}
{{this}}
{{/each}}
Input:
{
"record": {
"tags": ["one", "two", "three", "four", "five"]
}
}
Output:
four five
Tip
-
If
nis greater than or equal to the array length, the helper returns an empty array. -
Works only with arrays. For skipping elements in other data structures, convert them to arrays first (for example, using
arrayify). -
Useful for pagination, offset handling, or trimming unwanted leading elements.