Skip to main content

Iterator: Find

Run a predicate sub-graph once per element of an input list and emit the first element whose collected boolean is true. Short-circuits on the first match. Skips the step (no output) when no element matches. Mirrors JavaScript's Array.prototype.find.

Example
Input: [1, 2, 3, 4, 5]
Body: el → el > 2
Output: 3

Parameters

This function has no parameters.

Input

ArrayREQUIRED

List to iterate over (Array or JSON array).

Value

Optional value injected into every iteration as value on the entry node.

Output

Result

The first matching element. Skipped (no value emitted) if no element matches.