The List Data Type The List Data Type

The List Data Type

Zack Cohen Zack Cohen
The List Airkit type is used to group together values in a specific order. The
syntax for creating a List is to enclose a set of values inside square brackets,
separating the values by a comma - like Arrays in other languages. For example
to create a list with the numbers 1, 2, and 3 we would write the following Airscript expression:
[ 1, 2, 3 ]
Once grouped the values can be accessed by their numeric index. The indices
begin at zero, so the first value is located at index 0. If the list in the
previous example were stored in a variable named my_list we would write the
following Airscript expression to access the first value (the number 1).
Any expression that results in a Number can be used. Perhaps there is a
variable offset that holds a Number that is meant to index my_list. In
order to retrieve the value at that index we would write the following
If the provided index is greater than or equal to length of the list the
result will be NULL. Using my_list the following expression will result in

Other notes:
In Airscript, there are no direct equavilent .push or .append methods available.  The achieve the same result, use the FLAT method like so:

FLAT([my_array, new_item])