DISTINCT function

Synopsis
This function returns the source array with any duplicate elements removed.
Variations
DISTINCT(SourceArray)
Returns the source array with all duplicate elements removed.
Parameters
SourceArray

Specifies the array to isolate distinct elements in.

Supported types: Numeric array; Boolean array; String array; Point array; Object array.
Returns
Returned types: Numeric array; Boolean array; String array; Point array; Object array.
Examples
1.

In the following example, all duplicate entries are removed, keeping only the first occurrence of each one. The function returns [1, 5, 7, 6, 8, 9].

DISTINCT([1, 1, 5, 7, 6, 8, 1, 1, 5, 7, 9])
2.

In the following example, all duplicate entries are removed, keeping only the first occurrence of each one. The function returns [true, false].

DISTINCT([true, true, false, false, true, false, false])