pluck
String / MiscExtracts a single field from every object in an array, returning an array of those values. Supports dot-notation for nested fields. The array equivalent of get.
Syntax
pluck:fieldfieldField name to extract from each object (supports dot-notation)Use cases
| Use case | Description | URL | |
|---|---|---|---|
| All repo names | Get a plain list of every repo name without any other metadata. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|pluck:name|sort | |
| All post titles | Extract just the title from every post for a quick table-of-contents. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts|pluck:title|head:10 | |
| All user emails | Build a mailing list from the users endpoint. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users|pluck:email | |
| Nested city names | Use dot-notation to pluck a field two levels deep from every object. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users|pluck:address.city|sort | |
| Star counts for sorting | Pluck numeric values out to feed into min/max/sum. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|pluck:stargazers_count|sort |