> For the complete documentation index, see [llms.txt](https://docs.waterflai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/iteration-loop-node.md).

# Iteration loop Node

### Overview

The Iteration Loop Node enables repetitive execution of a sequence of nodes over a collection of items. It creates an isolated execution context for each iteration, making it ideal for processing arrays of data, batch operations, or repetitive tasks.

Usage cost: 0 credit

### Configuration

#### Settings

1. **Iteration Control**
   * Iterator\*: Select array variable to iterate over
   * Maximum Iterations: Limit the number of iterations (0-10,000)
   * Output Collection: Select child node output to collect results
2. **Context Variables** Available in child nodes during iteration:
   * `current_item`: Current item being processed
   * `index`: Current iteration index (number)

#### Output Ports

* `output` (Any\[]): Array of collected outputs from iterations
  * When Output Collection is specified
  * Maintains order of iterations
  * Preserves original data types

### Best Practices

1. **Iterator Selection**
   * Verify array data structure
   * Consider data volume
2. **Performance Management**
   * Set appropriate iteration limits
   * Consider batch processing
   * Optimize child node operations
3. **Output Collection**
   * Choose relevant outputs
   * Plan data aggregation
   * Consider memory usage

### Common Issues

* Memory overflow from large collections
* Iteration limit exceeded
* Missing iterator variable
