Lookup in list block
The block Lookup in list
allows you to find an object in a list (array) of objects.
Example inputs for this block:
The conditions that you use to lookup 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": "bill@acme.com", "name": "Bill Davis"}
]
In the above example inputs and example list, the output of the block 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:
{ $.lookupItemInList.item.fieldname }
This full json path representation allows you to add e.g. formula's:
{ uppercase: $.lookupItemInList.item.fieldname }
Iterator
This block uses an iterator, which means it can do lookups in large lists without the need to load the full input 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!