Filter
Filter an array of items into matching and non-matching groups based on field conditions with AND/OR logic.
The Filter node takes an array of items and splits it into two groups: items that match your conditions and items that do not. It outputs both groups along with counts, and routes execution to either the match or noMatch handle depending on whether any items passed the filter.
Use it whenever you need to separate records -- for example, filtering active users from inactive ones, keeping only orders above a certain amount, or extracting error entries from a log array.
Configuration
Source Array
| Field | Type | Required | Description |
|---|---|---|---|
| Source Array | template string | Yes | Variable path to the array to filter, e.g. nodes.httpRequest_1.body.items |
The source must resolve to an array. If it resolves to a non-array value, the node fails with a NOT_ARRAY error.
Match Logic
| Value | Behavior |
|---|---|
| All conditions (AND) | An item must satisfy every condition to be included in the match group |
| Any condition (OR) | An item satisfying at least one condition is included in the match group |
Defaults to AND.
Conditions
Each condition tests a property on each item in the source array.
| Field | Type | Required | Description |
|---|---|---|---|
| Field | text | Yes | Property name on each array item to test (e.g. status, amount). For primitive arrays, the item value itself is tested. |
| Data type | select | No | Type hint: String, Number, Boolean, Date, Array, Object, or Any. Defaults to Any. |
| Operator | select | Yes | Comparison operator. The list updates based on the selected data type. |
| Value | text | Conditional | Expected value. Hidden for unary operators like "is empty". |
| Ignore case | toggle | No | Case-insensitive comparison for String and Any types. Defaults to off. |
If no conditions are defined, all items pass through to the match group.
Output Handles
| Handle | Color | Description |
|---|---|---|
| match | Green | Fires when at least one item matched the conditions |
| noMatch | Gray | Fires when zero items matched the conditions |
Output
| Field | Type | Description |
|---|---|---|
| filtered | array | Items that matched the conditions |
| count | number | Number of matched items |
| rejected | array | Items that did not match the conditions |
| rejectedCount | number | Number of rejected items |
| route | string | "match" if any items passed, "noMatch" if none did |
Example
An HTTP Request node returns a list of orders. You want to process only orders with a total above 100:
- Add a Filter node after the HTTP Request node.
- Set Source Array to
nodes.httpRequest_1.body.orders. - Add a condition: Field =
total, Data type = Number, Operator = Greater than, Value =100. - Connect the match handle to the next processing step.
- Optionally connect the noMatch handle to a notification node that alerts when no qualifying orders were found.
Downstream nodes can reference nodes.filter_1.filtered to access the matching orders array, or nodes.filter_1.count to get the count.
See the Logic Nodes overview for a full list of available nodes.