GROUP
Returns grouped values within an array
Parameters
values
Array (required) - The values to sort
callback
function (optional) - A transform function to use when sorting objects
Returns
Array
Examples
GROUP(['red', 'green', 'green', 'blue'])
// returns {"red":["red"],"green":["green","green"],"blue":["blue"]}
GROUP([1, 1, 1, 2, 3])
// returns {"1":[1,1,1],"2":[2],"3":[3]}
Updated about 1 year ago