Adds values specified in parameters to an array and returns that array.
Verifies if an array contains the value.
Removes duplicates inside an array. Use `key` argument to access properties inside complex objects. To access nested properties, use dot notation. The first item in an array is index 1.
distinct(Contacts[];name)
= Removes duplicates inside an array of contacts by comparing the `name` property.
Creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
More details about flatten function can be found at the Array.prototype.flat documentation.
Concatenates all the items of an array into a string, using the specified separator between each item.
Returns an array of a given object's or array's properties.
Returns the number of items in an array.
Returns a primitive array containing values of a complex array. Allows filtering values. Use raw variable names for keys.
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.
See also our Extract an item and/or its value from an array of collections video tutorial.
Merges one or more arrays into one array.
Removes values specified in the parameters of an array. Effective only on primitive arrays of text or numbers.
The first element of the array becomes the last element and vice versa.
Returns a new array containing only selected items.
Sorts values of an array. The order is either `asc` or `desc`. Use `key` argument 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.
sort(Contacts[];name)
= Sorts an array of contacts by the `name` property.
sort(Emails[];sender.name)
= Sorts an array of emails by the `sender.name` property.