#distinct
Returns the items with distinct values of a specified property, or distinct scalar values.
#distinct(array, @x: key?)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
array |
path | array |
The source array. |
key (optional) |
lambda |
Selects the value that determines uniqueness. |
Returns
Section titled “Returns”array
Examples
Section titled “Examples”Distinct by property
Section titled “Distinct by property”#distinct($.some.path, @x: @x.propertyName)