Skip to main content Skip to complementary content

Filter list block

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.

The Filter List block.

The Filter List block.

Example settings:

Inputs for the Filter List block.

The Filter List block's Inputs tab. Contains a sample list, and the Conditions Property from item in list and Operator.

The conditions that you use to filter are identical to the conditions of the Conditions block. 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 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 page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!