Sign In

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

FieldTypeRequiredDescription
Source Arraytemplate stringYesVariable 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

ValueBehavior
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.

FieldTypeRequiredDescription
FieldtextYesProperty name on each array item to test (e.g. status, amount). For primitive arrays, the item value itself is tested.
Data typeselectNoType hint: String, Number, Boolean, Date, Array, Object, or Any. Defaults to Any.
OperatorselectYesComparison operator. The list updates based on the selected data type.
ValuetextConditionalExpected value. Hidden for unary operators like "is empty".
Ignore casetoggleNoCase-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

HandleColorDescription
matchGreenFires when at least one item matched the conditions
noMatchGrayFires when zero items matched the conditions

Output

FieldTypeDescription
filteredarrayItems that matched the conditions
countnumberNumber of matched items
rejectedarrayItems that did not match the conditions
rejectedCountnumberNumber of rejected items
routestring"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:

  1. Add a Filter node after the HTTP Request node.
  2. Set Source Array to nodes.httpRequest_1.body.orders.
  3. Add a condition: Field = total, Data type = Number, Operator = Greater than, Value = 100.
  4. Connect the match handle to the next processing step.
  5. 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.

On this page

Filter | Buildorado