Array

The Array function returns an array containing specified values.

Syntax

Array([values])

Function arguments:

values

[optional] Comma-separated values used to construct the array.

Values can include a variety of input, including integers, strings, boolean values, columns, and results of function calls.

Examples

Example 1

Array(1, 2, 3)

Returns the array [1,2,3]

Example 2

Array(1, "Hello", Today())

Returns the array [1,"Hello","2024-03-14 00:00:00.000 Z"] when the current date is March 14, 2024.

Example 3

Array("red", "orange", "yellow")[1]

Because the array has an index range from 0 to 2, [1] instructs Analytics Pro to access the value in the second position, which returns "orange".

Last updated

Was this helpful?