Repository navigation
Keyword array filter
Oliver Atkinson edited this page May 10, 2026
·
1 revision
Keeps array elements whose predicate returns true.
The predicate runs once for each element. During each predicate run, item is the current element.
{
"{returns}": {
"array_filter": {
"array": [],
"predicate": true
}
}
}{
"{returns}": {
"array_filter": {
"array": [
{ "name": "Dorothy", "has_ticket": true },
{ "name": "Scarecrow", "has_ticket": false }
],
"predicate": {
"{returns}": {
"comparison": {
"equal": {
"lhs": { "{returns}": { "item": ["has_ticket"] } },
"rhs": true
}
}
}
}
}
}
}The result keeps only Dorothy.