Skip to content

Filter Key

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.

ParameterTypeRequiredDescription
keytextYesName of the key/field to filter by
valuesarrayYesList of accepted values for the filter
{
"nextModule": "siguiente_modulo",
"data": [
{ "id": 1, "category": "electronics", "name": "Laptop" },
{ "id": 3, "category": "clothing", "name": "Camiseta" }
]
}
{
"key": "category",
"values": ["electronics", "clothing"]
}
{
"key": "estado",
"values": ["pendiente", "en_proceso"]
}
  • The input data must be an array of objects; if not, the module returns an error
  • The key field must be a string and values must 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
  • save2json (save filtered data to JSON)
  • saveToExcel (save filtered data to Excel)
  • readexcel (read data to filter)