Filter (core.filter)
Keep the items that match your conditions and drop the rest — one input, one output. Same condition system as the IF node; the difference is that IF routes every item somewhere, while Filter's non-survivors simply disappear from the run.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
conditions | list of conditions | [] | Each condition is data_type + left + operator + right. Both sides accept {{ }} expressions, evaluated per item. |
combine | and | or | and | and: every condition must hold. or: any one is enough. |
keep | matching | non_matching | matching | Which side survives. non_matching is a built-in "reject" — keep the failures without rewriting conditions. |
The operators, per-type coercion, and the "incomparable values are just false, never a crash" guarantee are identical to the IF node — see its operator table.
Behavior
conditions $json.n >= 10 (number)
input {"n": 5} {"n": 20} {"n": 10} {"n": 3}
output {"n": 20} {"n": 10}
Survivors keep their input order, their binary attachments, and a
paired_item pointing at their original index — so lineage back to the
source item survives the dropped rows.
Both sides can be expressions. right = {{ $json.threshold }} compares
each item's n against that item's own threshold.
A fully-filtered output doesn't strand the graph. If nothing survives, downstream nodes on this branch are skipped — and a merge fed by this branch still fires on its other inputs instead of waiting forever.
Quirks & tips
- Empty conditions follow the same vacuous-truth rule as IF: with
andevery item "matches" (all kept), withornone do (all dropped) — andkeep: non_matchinginverts both. Add a condition before trusting output. - A missing reference stops the node.
{{ $json.nope }}on an item without that key is an expression error, not a silent drop. Use theis emptyoperator to test optional fields safely. - Dropped means gone. If you need to see the rejects (audit them, alert on them), use IF instead — its false branch is your reject stream.
- The string data type doesn't coerce numbers (
10≠"10") — pick the number type for numeric comparisons, same as IF.
Related
- IF — the two-output sibling: route instead of drop.
- Switch — first-match routing across up to 8 named outputs.
- Loop Over Items — process survivors in batches.