For the complete documentation index, see llms.txt. This page is also available as Markdown.

Generic JSON Iteration Node

The Generic JSON Iteration Node iterates either over a defined range of numeric indexes or over the elements of a JSON array.

When both iteration methods are configured, the JSON Array takes priority over the Start and End values.

During each iteration, the node stores the current iteration data in temporary stream variables. These values can be used by subsequent nodes to process each array element or to build loop-based workflows.


Configurable Settings

Async

Enables or disables asynchronous execution.

Start

The index at which a range-based iteration should begin.

The value must be parseable as an integer.

Example:

0

End

The final index for a range-based iteration.

The value must be parseable as an integer.

Example:

10

JSON Array

The JSON array that should be processed.

When a valid JSON array is provided, the node iterates over its entries and ignores the configured Start and End values.

Example:

The JSON value can also be provided through a wildcard, for example from a previous HTTP request or JSON-processing node.


Temporary Variables

For every iteration, the node creates the following temporary variables. Replace <nodeID> with the UUID of the Generic JSON Iteration Node.

Current Index

Contains the index currently being processed.

End Index

Contains the configured or calculated final index of the iteration.

Current Value

Contains the current JSON array element.

For the node shown above, the variables are:

Output all three stream variables (if available)
Output in a message just using start-end parameters
Output in a message just using json array

Stopping a Range-Based Iteration

When using the Start and End settings, the loop can be stopped early by setting the current index variable to a value outside the configured range.

Example:

Set iteration index to higher value

This is useful when a following condition determines that no further entries need to be processed.


Typical Usage

Use a JSON response returned by an HTTP Request Action:

Then access the current array entry in following nodes:

For example, when each array item contains an id field:

Last updated