The block "Filter list" allows you to filter a list (array) of objects based on one or more conditions. The output of the block will be a list with a subset of objects from the input list.

Example settings:

The conditions that you use to filter are identical to the conditions of the "Conditions" block. We refer to the documentation of conditions for more information.

Example list

[
      {"email": "john@doe.com", "name": "John Doe"},
      {"email": "", "name": "Bill Davis"}
]

With the above example settings, the output list will be:

[
      {"email": "john@doe.com", "name": "John Doe"},
]

Property from item in list

The input "property from item in list" accepts a key such as email or a nested key such as profile.email.

Alternatively, you can also switch to Raw view, and use a full path to indicate a key. Example:

{ $.filterList.item.fieldname }

This full json path representation allows you to add e.g. formula's:

{ uppercase: $.filterList.item.fieldname }

Iterator

This block uses an iterator, which means it can do filter large lists, without the need to load the full input list in memory. The output list will also be an iterator, meaning it will be processed by consecutive blocks using an iterator (no need to load the full output list in memory).

Did this answer your question?