> For the complete documentation index, see [llms.txt](https://docs.videsk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videsk.io/es-developers/webhooks/helpers/each.md).

# #each

A continuación, podrás encontrar la documentación de como utilizar este helper.

Este helper permite iterar sobre un `Array` para generar un formato con cada valor descrito.

{% hint style="success" %}
Puedes utilizar este helper con cualquier formato, a diferencia de [`#array`](/es-developers/webhooks/helpers/array.md) que es específicamente para formato `JSON`.
{% endhint %}

#### Datos de ejemplo

```json
{
    "users": [
        {
            "name": "John Doe",
            "latestConnection": "2021-08-21T23:26:13.000Z"
        },
        {
            "name": "Maria Doe",
            "latestConnection": "2021-09-08T20:17:48.000Z"
        }
    ]
}
```

## Ejemplos de uso

{% hint style="warning" %}
Este helper retornará los valores como texto plano, por lo que debes tener cuidado con valores como `Array` y `Object`.
{% endhint %}

{% tabs %}
{% tab title="XML" %}
**Sintaxis**

```handlebars
<users>
    {{#each users}}
        <user>
            <name>{{name}}</name>
            <lastConnection>{{latestConnection}}</lastConnection>
        </user>
    {{/each}}
</users>
```

**Resultado**

```xml
<users>
    <user>
        <name>John Doe</name>
        <lastConnection>2021-08-21T23:26:13.000Z</lastConnection>
    </user>
    <user>
        <name>Maria Doe</name>
        <lastConnection>2021-09-08T20:17:48.000Z</lastConnection>
    </user>
</users>
```

{% endtab %}

{% tab title="JSON" %}
{% hint style="info" %}
Para el caso de formato `JSON` te sugerimos utilizar el helper [`#array`](/es-developers/webhooks/helpers/array.md).
{% endhint %}
{% endtab %}

{% tab title="Markdown" %}
**Sintaxis**

```handlebars
# Usuarios
| Nombre   | Última conexión |
|----------|:-------------:|
{{#each users}}
| {{name}} | {{latestConnection}} |
{{/each}}
```

**Resultado**

```markdown
# Usuarios
| Nombre   | Última conexión |
|----------|:-------------:|
| John Doe | 2021-08-21T23:26:13.000Z |
| Maria Doe | 2021-09-08T20:17:48.000Z |

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.videsk.io/es-developers/webhooks/helpers/each.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
