Array (aka. list) represents ordered collection of elements. The following are properties and operators supported for Array.
Property | Type | Description |
@count | int | number of elements in array. For example, to get locations count - use locations.@count |
[<index>] |
|
accesses arrays's element by its index. Index can be either integer value or a variable. For example, locations[0] accesses first location in the locations array; locations[index] accesses a location at index specified by index variable. If variable is not an array - [] operator will be ignored. If index is not an integer or index is out of arrays's bounds - [] operator returns no result. |
+<array> | Array | appends an element to an array. + is a prefix operator and it must be used for out variables only. For example, if you need to append an array with newly obtained location, you should put +locations as "Get Location" task's out variable. If variable is not an array (e.g. a string), it will be transformed to a list containing that string element and then a new element will be added. |
@asJSON | String | formatted JSON representation |
@reverseArray | Array | a new array containing all elements in reverse order |
@firstObject | Object | fist element of array |
@lastObject | Object | last element of array |
@anyObject | Object | any randomly-selected element of array |
@asString | String | textual representation of array where each element occupies one line |
See also:
Variable Types
Action Environment
Tasks and Workflows
Actions
Next > Clipboard