Filter Key
Description
Section titled “Description”The Filter Key module filters an array of objects based on a key and a set of allowed values. It receives a dataset (array) as input and returns only the elements whose value in the specified key matches any of the provided values. It is useful for segmenting data before processing in subsequent nodes, for example, filtering products by category, orders by status, or customers by type.
Configuration
Section titled “Configuration”Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| key | text | Yes | Name of the key/field to filter by |
| values | array | Yes | List of accepted values for the filter |
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": [ { "id": 1, "category": "electronics", "name": "Laptop" }, { "id": 3, "category": "clothing", "name": "Camiseta" } ]}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "key": "category", "values": ["electronics", "clothing"]}Filter orders by status
Section titled “Filter orders by status”{ "key": "estado", "values": ["pendiente", "en_proceso"]}- The input data must be an array of objects; if not, the module returns an error
- The
keyfield must be a string andvaluesmust be an array - Comparison is exact (uses
Array.includes), so it is case-sensitive - If no elements match the values, the result will be an empty array
- Does not require credentials
Related Nodes
Section titled “Related Nodes”- save2json (save filtered data to JSON)
- saveToExcel (save filtered data to Excel)
- readexcel (read data to filter)