LassoScript Utility
Basics Browse Detail

Array Type

Tag Link Array Type Category Data Type
Type Data Type Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0


An array is an object that can hold multiple values which are referenced by position. An array can be thought of as a series of numbered variables or as a list. Array elements are numbered starting at 1 and are always sequential.

Arrays can hold values of any other data type. Arrays can hold integers, decimals, strings, pairs, or even other arrays or maps. The size of an array is only limited by the amount of memory that is available.

A new, empty array can be created using the [Array] tag. For example, [Variable: 'myArray' = (Array)] places a new, empty array in the variable myArray.

An array can also be created with values by specifying parameters within the [Array] tag. Each parameter to the [Array] tag becomes one element of the array. For example, [Variable: 'myArray' = (Array: 1, 2, 3)] creates a new array with three elements.

See the descriptions for each of the array members tags such as [Array->Size], [Array->Get], [Array->Insert], [Array->Remove], [Array->Sort], etc. for details about how to manipulate elements of the array.

The contains symbol >> can be used to check whether an array returns a given value. For example [(Array: 1, 2, 3) >> 1] returns True.

Arrays are returned as the result from many Lasso tags. For example, [String->Split] returns an array of elements from a string and [Action_Params] returns an array of pairs representing the parameters passed to the current Lasso action.


[Variable: 'myArray' = (Array)]

[Variable: 'myArray' = (Array: 'one', 'two', 'three')]

[Variable: 'myArray' = (String: '1 2 3')->(Split: ' ')]


No Parameters Required.


See the Lasso 8 Language Guide for examples of how to use this tag.

Category Tags