> ## 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 (Variable Index)

> Get element from array using a variable index

## Overview

The `array-get-var` transformation retrieves an element from an array using an index provided as a variable. This is similar to [Array Get](/advanced-guide/transformations/array-get), but the index comes from a variable instead of a static option.

## Syntax

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

## Parameters

| Parameter        | Type     | Required | Description                                                  |
| ---------------- | -------- | -------- | ------------------------------------------------------------ |
| `variable`       | array    | Yes      | The array to get element from                                |
| `index-variable` | variable | Yes      | The variable containing the index of the element to retrieve |

## Examples

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