Use Filter to remove items from a list before iterating or passing it to another step. Unlike an IF, this node does not choose a branch: it produces a list in items.
For example, with manual input { "contacts": [{ "name": "Ada", "active": true }, { "name": "Lin", "active": false }] }, set:
With AND, an item must meet all conditions; with OR, one is enough. The field is an item-relative path such as profile.active, rather than an input.contacts... expression. To run an action per retained contact, use a loop with a source pointing to nodes.filter1.items. The list walkthrough shows the complete chain.
Technical type : filter. Runtime : nodulz.
Credentials and prerequisites
This node defines no dedicated external credential. Remote sources or execution targets may still need their own access credentials.
See the credentials guide if a remote source or execution target requires access.
Parameters
Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.
Test an active contact, an inactive contact and an empty list. Check count and removed, then the contents of items. If all items disappear, check the relative field and comparison value first. An empty list is a possible result, rather than a node failure.
Keep only items matching a condition
Usage and specifics
Use Filter to remove items from a list before iterating or passing it to another step. Unlike an IF, this node does not choose a branch: it produces a list in
items.For example, with manual input
{ "contacts": [{ "name": "Ada", "active": true }, { "name": "Lin", "active": false }] }, set:input.contacts.active, read within each contact.equals; value:true.Expected output:
{ "items": [{ "name": "Ada", "active": true }], "count": 1, "removed": 1, "combinator": "and" }With AND, an item must meet all conditions; with OR, one is enough. The field is an item-relative path such as
profile.active, rather than aninput.contacts...expression. To run an action per retained contact, use a loop with a source pointing tonodes.filter1.items. The list walkthrough shows the complete chain.Technical type :
filter. Runtime :nodulz.Credentials and prerequisites
This node defines no dedicated external credential. Remote sources or execution targets may still need their own access credentials.
See the credentials guide if a remote source or execution target requires access.
Parameters
Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.
sourcestring""combinatorenum"and"and,orconditionsarray[{"field":"","operator":"equals","value":""}]conditions[].fieldstring""conditions[].operatorenum"equals"equals,not_equals,contains,not_contains,gt,gte,lt,lte,empty,not_emptyconditions[].valuestring""fieldstringoperatorenumequals,not_equals,contains,not_contains,gt,gte,lt,lte,empty,not_emptyvaluestringInitial configuration
Initial catalog configuration example, to adapt before running. Keep secrets in credentials.
{ "source": "", "combinator": "and", "conditions": [ { "field": "", "operator": "equals", "value": "" } ] }Verification
Test an active contact, an inactive contact and an empty list. Check
countandremoved, then the contents ofitems. If all items disappear, check the relative field and comparison value first. An empty list is a possible result, rather than a node failure.See also : Expressions and data, Executions, Node catalog.