0

unique

To return an array with unique elements

Filter out duplicates from one or more arrays to get an array with only unique values. This can be helpful to make sure there are no double entries in your array.

Syntax

unique([any], [any], ...)

Return

[any]

Examples

  unique(["D", "C", "A", "A", "D", "B"])

Result: D,C,A,B

  >sort(unique(["A", "D", "A", "B"], ["B", "C", "E", "D"], ["F", "E"]))

Result: A,B,C,D,E,F

count(myList) = count(unique(myList))

Result: Returns Yes (true) if my list has no duplicates.

See also

rsort which sorts an array in descending order.

sort which sorts an array in ascending order.

Reply

null