A reference document listing built-in convenience functions to support data transformation in expressions for arrays.
Returns the value of elements in an array.
Splits arrays into chunks with a length of size.
Function parameters
- size (REQUIRED, NUMBER): The size of each chunk.
Removes empty values from the array.
Compares two arrays.
Returns all elements in the base array that aren't present in arr.
Function parameters
- arr (REQUIRED, ARRAY): The array to compare to the base array.
Compares two arrays.
Returns all elements in the base array that are present in arr.
Function parameters
- arr (REQUIRED, ARRAY): The array to compare to the base array.
Returns the first element of the array.
Checks if the array doesn't have any elements.
Checks if the array has elements.
Returns the last element of the array.
Returns the highest value in an array.
Merges two Object-arrays into one array by merging the key-value pairs of each element.
Function parameters
- arr (REQUIRED, ARRAY): The array to merge into the base array.
Gets the minimum value from a number-only array.
Returns an array of Objects where keys equal the given field names.
Function parameters
- fieldName (OPTIONAL, STRING): The key(s) you want to retrieve.
You can enter as many keys as you want, as comma-separated strings.
Returns a random element from an array.
Removes duplicates from an array.
Function parameters
- key (OPTIONAL, STRING): A key, or comma-separated list of keys, to check for duplicates.
Renames all matching keys in the array.
You can rename more than one key by entering a series of comma-separated strings, in the pattern oldKeyName, newKeyName.
Function parameters
from (REQUIRED, STRING): The key you want to rename.
to (REQUIRED, STRING): The new name.
Operates on an array of objects where each object contains key-value pairs.
Creates a new object containing key-value pairs, where the key is the value of the first pair, and the value is the value of the second pair.
Removes non-matching and empty values and trims any whitespace before joining.
Function parameters
- keyField (REQUIRED, STRING): The key to join.
- nameField (REQUIRED, STRING): The value to join.
BASIC USAGE
// Input
{{ [{"type":"fruit", "name":"apple"},{"type":"vegetable", "name":"carrot"} ].
---smartJoin("type","name") }}
// Output
[Object: {"fruit":"apple","vegetable":"carrot"}]Returns the total sum of all the values in an array of parsable numbers.
Convert an array to a JSON string.
Equivalent of JSON.stringify.
Concatenates two arrays and then removes duplicate.
Function parameters
- arr (REQUIRED, ARRAY): The array to compare to the base array.
Remove duplicates from an array.
Function parameters
- key (OPTIONAL, STRING): A key, or comma-separated list of keys, to check for duplicates.