ARRAY FUNCTIONS IN MAKE.COM add (array; value1; value2; ...) Adds values specified in parameters to an array and returns that array. contains (array; value) Verifies if an array contains the value. deduplicate (array) Removes duplicates from an array. distinct (array; [key]) Removes duplicates inside an array. Use the key argument to access properties inside complex objects. To access nested properties, use dot notation. The first item in an array is index 1. first (array) Returns the first element of an array. flatten (array) Creates a new array with all sub-array elements concatenated into it recursively up to the specified depth. join (array; separator) Concatenates all the items of an array into a string, using a specified separator between each item. keys (object) Returns an array of a given object's or array's properties. last (array) Returns the last element of an array. length (array) Returns the number of items in an array. map (complex array; key;[key for filtering];[possible values for filtering separated by a comma]) Returns a primitive array containing values of a complex array. Allows filtering values. Use raw variable names for keys. merge (array1; array2; ...) Merges two or more arrays into one array. remove (array; value1; value2; ...) Removes values specified in the parameters of an array. Effective only in case of primitive arrays of text or numbers. reverse (array) The first element of the array becomes the last element and vice versa. shuffle (array) Shuffles (randomly reorders) elements of an array. slice (array; start; [end]) Returns a new array containing only selected items. The first item in the array has an index of 0. sort (array; [order]; [key]) Sorts values of an array. The valid values of the order parameter are: toArray (collection) Converts a collection into an array of key-value collections. toCollection (array; key; value) Converts an array containing objects with key-value pairs into a collection.