---
title: "Action loop__start"
description: "Starts a loop over an array: the current item is available in the loop_data constant."
---

# Action `loop__start`

> **System ID:** `action_loop__start`  
> Also in the scenario: `loop__start`  
> Alias of the same logic: [`loop_start`](/en/actionjail/reference/actions/loop_start.md) (`action_loop_start`).

## Description

Starts iteration over an array of objects. The array can be passed directly in JSON or taken from a constant (`constant`). The current item is written to `loop_data`; `loop_array`, `loop_max`, and `loop_iterator` are also created. Then in the scenario process the item and finish the iteration via [`loop__end`](/en/actionjail/reference/actions/loop__end.md).

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | Loop started, `loop_data` has the first / next item |
| **error** | No parameters, array invalid or empty |

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| *(direct array)* | array | no | `[]` | Array of objects to iterate (if the config is an array) |
| `constant` | string | no | — | Name of the constant with the array (if the config is an object) |

## Configuration example

```json
{
  "constant": "photos"
}
```

Or directly:

```json
[
  { "name": "Item 1", "value": 1 },
  { "name": "Item 2", "value": 2 }
]
```

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
- [Action loop__end](/en/actionjail/reference/actions/loop__end.md)
- [Action loop_start](/en/actionjail/reference/actions/loop_start.md)
