setSize
setSize(set)
setSize(set, unique)
Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.
Try it yourself:
$1 | setSize([1, 2, 2, 4])
| |
$2 | setSize([1, 2, 2, 4], true)
|