Iterate

Labels: :IA_Function:IA_Iterate
Inherits from: Function

Iterates over an array or object input. For each key-value pair in input data it triggers an iteration event with that pair.

There are two types of iteration:

  1. Parallel: all iterations will be triggered/started immediately in parallel
  2. Serial: next iterations will be triggered after an update event on the IA_Iterate function instance with the nextIteration parameter updated

Parameters

Key Description Default value Possible values
data Collection of values to iterate over object or array
iterationType How the iterations will be made serial serial or parallel
nextIndex Specifies which item should be iterated next null integer
nextIteration Parameter should be updated with true in serial mode to trigger next iteration null true or null

If nextIndex item does not exist the iteration ends.

Outgoing triggers

An Iterate triggers following events:

Type: iteration

Occurrence: Triggered when the function executes for each key-value pair in input data.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Item data any
index Item index string

Type: iterationEnd

Occurrence: Triggered when there are no more items to iterate through or when nextIndex specifies an item that does not exist.