distinct
ArrayRemoves all duplicate values from an array regardless of position — the full-array version of uniq. Sort is not required beforehand.
Syntax
distinctUse cases
| Use case | Description | URL | |
|---|---|---|---|
| Unique programming languages | Get the set of languages used across a user's repos. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|pluck:language|distinct|sort | |
| Unique user IDs in todos | Find which users have at least one todo without counting duplicates. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/todos|pluck:userId|distinct|sort | |
| Deduplicate a mixed list | Remove all repeat values from an unsorted array. | https://httpip.es/api/pipe/echo:["js","python","js","go","python","go","rust"]|distinct|sort | |
| Unique post authors | List every unique userId that has authored a post. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts|pluck:userId|distinct|sort |