GET_ITEM
Written by
Updated at November 6, 2024
Syntax
GET_ITEM( array, index )
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 stringsindex—Integer
Return type: Depends on argument types
Example
GET_ITEM([array_field], 2)
Data source support
ClickHouse 21.8, Files, Google Sheets, PostgreSQL 9.3, Yandex Documents.