---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/function-ref/GET_ITEM
  - ru/function-ref/GET_ITEM
  - href: en/function-ref/GET_ITEM.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/function-ref/GET_ITEM.html
editable: false
vcsPath: en/function-ref/GET_ITEM.md
---

# GET_ITEM



#### Syntax {#syntax}


```
GET_ITEM( array, index )
```

#### Description {#description}
Returns the element with the index `index` from the array `array`. Index must be any integer. Indexes in an array begin with one. Returns the last item from the array if `index` is `-1`.

**Argument types:**
- `array` — `Array of fractional numbers | Array of integers | Array of strings`
- `index` — `Integer`


**Return type**: Depends on argument types

#### Example {#examples}

```
GET_ITEM([array_field], 2)
```


#### Data source support {#data-source-support}

`ClickHouse 21.8`, `Files`, `Google Sheets`, `PostgreSQL 9.3`, `Trino`, `Yandex Documents`.
