Array Functions in Fusion Flashcards
What function adds values specified in parameters to an array and returns that array?
add (array; value1; value2; …)
What verifies if an array contains the value?
contains (array; value)
What removes duplicates inside an array?
distinct (array; [key])
*It uses 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.
What creates a new array with all sub-array elements concatenated into it, recursively, up to the specified depth?
flatten (array)
What concatenates all of the items of an array into a string, using the specified separator between each item?
join (array; separator)
What returns an array of the properties of a given object or array?
keys (object)
What returns the number of items in an array?
length (array)
What returns a primitive array containing values of a complex array? This function allows filtering values. Use raw variable names for keys.
map (complex array; key;[key for filtering];[possible values for filtering])
What merges one or more arrays into one array?
merge (array1; array2; …)
What removes values specified in the parameters of an array? This function is effective only on primitive arrays of text or numbers.
remove (array; value1; value2; …)
What array makes the first element of the array become the last element, the second element becomes the next-to-last element, and so on?
reverse (array)
What returns a new array containing only selected items?
slice (array; start; [end])
What formula is used to sort values of an array?
sort (array; [order]; [key])
What are the valid values of the order parameter for a sort array?
asc - ascending order
desc - decsendign order
asc ci - case insensitive ascending order
desc ci - case insensitive descending order
What formula returns the difference between two arrays?
arrayDifference [array1, array2, mode]