findall
Finds all the elements of a collection that satisfy a condition.
.var {numbers}
- 3
- 8
- 12
.numbers::findall {n: .n::isgreater than:{5}} <!-- 8, 12 -->Content copied to clipboard
Return
a new collection containing the elements that satisfy condition, in their original order. If no element does, the collection is empty
Parameters
from
collection to search in
condition
condition to check, which accepts one argument (the current element) and returns a boolean