Search…
⌃K
Links

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

1
unique(["D", "C", "A", "A", "D", "B"])
Result: D,C,A,B
1
sort(unique(["A", "D", "A", "B"], ["B", "C", "E", "D"], ["F", "E"]))
Result: A,B,C,D,E,F
1
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.
Last modified 3mo ago