51黑料不打烊

Array functions

join (array; separator)

Concatenates all of the items of an array into a string, using the specified separator between each item.

length (array)

Returns the number of items in an array.

keys (object)

Returns an array of the properties of a given object or array.

slice (array; start; [end])

Returns a new array containing only selected items.

merge (array1; array2; 鈥�)

Merges one or more arrays into one array.

contains (array; value)

Verifies if an array contains the value.

remove (array; value1; value2; 鈥�)

Removes values specified in the parameters of an array. This function is effective only on primitive arrays of text or numbers.

add (array; value1; value2; 鈥�)

Adds values specified in parameters to an array and returns that array.

map (complex array; key;[key for filtering];[possible values for filtering])

Returns a primitive array containing values of a complex array. This function allows filtering values. Use raw variable names for keys.

Examples:

  • map(Emails[];email)

    Returns a primitive array with emails

  • map(Emails[];email;label;work;home)

    Returns a primitive array with emails having a label equal to work or home

For more information, see Map an array or array element.

shuffle

sort (array; [order]; [key])

Sorts values of an array. The valid values of the order parameter are:

  • asc

    (default) - ascending order: 1, 2, 3, 鈥� for type Number. A, B, C, a, b, c, 鈥� for type Text

  • desc

    descending order: 鈥�, 3, 2, 1 for type Number. 鈥�, c, b, a, C, B, A for type Text.

  • asc ci

    case insensitive ascending order: A, a, B, b, C, c, 鈥� for type Text.

  • desc ci

    case insensitive descending order: 鈥�, C, c, B, b, A, a for type Text.

Use the key parameter to access properties inside complex objects.

Use raw variable names for keys.

To access nested properties, use dot notation.

The first item in an array is index 1.