Skip to main content

collections.DistinctBy

First-seen deduplication by one field of each element

collections.DistinctBy(arr: array, field: string) -> array

Arguments

NameType
arrarray
fieldstring

Example

{{ collections.DistinctBy(rows, "supplier") }}

Returns (one row per distinct supplier, the first seen).