Returns a new array with only the unique elements based on a key extracted from each element.
The function uses the provided key extractor function to determine uniqueness of each element.
If an element's key has been encountered before, it will be excluded from the result.
Returns a new array with only the unique elements based on a key extracted from each element.
The function uses the provided key extractor function to determine uniqueness of each element. If an element's key has been encountered before, it will be excluded from the result.