> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Array Get (Index variable)

> Obtenir un élément d'un tableau en utilisant un index variable

## Présentation

La transformation `array-get-var` récupère un élément d'un tableau en utilisant un index fourni sous forme de variable. Elle est similaire à [Array Get](/fr/advanced-guide/transformations/array-get), mais l'index provient d'une variable au lieu d'une option statique.

## Syntaxe

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
array-get-var(<variable>, <index-variable>)
```

## Paramètres

| Paramètre        | Type     | Requis | Description                                            |
| ---------------- | -------- | ------ | ------------------------------------------------------ |
| `variable`       | array    | Oui    | Le tableau dans lequel récupérer un élément            |
| `index-variable` | variable | Oui    | La variable contenant l'index de l'élément à récupérer |

## Exemples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
array-get-var(<variable>, <index-variable>)
```
