JSON: Filter¶
Filters JSON data based on a key/value condition. Expects a list (array) of objects and returns only the objects that match the comparison rule. Supports equals, contains, starts_with, and ends_with comparisons.

Usage¶
Use this node to select a subset of objects from JSON data by matching a specific field against a target value. Typically placed after nodes that produce or transform JSON arrays, and before nodes that consume the filtered results.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| json_data | True | WILDCARD | JSON data to filter. Should be a list (array) of objects. If a string is provided, the node will attempt to parse it as JSON. | [{"name":"Alice"},{"name":"Bob"}] |
| filter_key | True | STRING | The object key (field name) to evaluate for each item in the array. | name |
| filter_value | True | WILDCARD | The value to compare against the item's field. For contains/starts_with/ends_with, comparisons are done as strings. | Al |
| filter_mode | True | ["equals", "contains", "starts_with", "ends_with"] | How to compare the item's field value with filter_value. | starts_with |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| filtered_data | WILDCARD | Filtered JSON data. If input is a list of objects, returns a list containing only matching objects. In non-list cases or on error, returns the original input. | [{"name":"Alice"}] |
Important Notes¶
- Input parsing: If json_data is a string, the node attempts to parse it as JSON.
- List required: Actual filtering occurs only when json_data is a list (array). Otherwise, the original data is returned unmodified.
- Empty key handling: If filter_key is empty, the original data is returned.
- Comparison behavior: equals uses direct equality. contains, starts_with, and ends_with compare string forms of the values.
- Missing keys: Objects that do not contain the specified filter_key are ignored (not included in the output).
- Error handling: On exceptions, the node returns the original json_data.
Troubleshooting¶
- No items returned: Verify that json_data is a list of objects and that each object contains the specified filter_key.
- Unexpected unfiltered output: Ensure json_data is a list. If it is a single object or another type, the node returns it unchanged.
- Contains/starts/ends not matching numeric/boolean fields: These modes compare string representations. Confirm the string form matches your expectation.
- Invalid JSON string input: If providing a string, ensure it is valid JSON. Invalid strings will cause the node to return the original input.
- Equals not matching: Check for exact type/value equality (e.g., number 1 vs string "1"). Use contains/starts_with/ends_with if appropriate.