sort
ArraySorts an array in ascending order. Without an argument, sorts primitive values naturally. With a field argument, sorts an array of objects by that field. Supports dot-notation for nested fields.
Syntax
sort:field?fieldoptionalObject field to sort by (supports dot-notation). Omit for primitive arrays.Use cases
| Use case | Description | URL | |
|---|---|---|---|
| Repo names A → Z | Alphabetically sort a user's repo list to make it easier to scan. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|sort:name | |
| Posts by title | Sort blog posts alphabetically by title for a predictable reading list. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts|sort:title|head:10|pick:id,title | |
| Todos by userId | Group todos visually by sorting on the userId field. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/todos|sort:userId|head:20|pick:userId,title,completed | |
| Sort raw numbers | Sort a literal array of numbers to verify natural ordering. | https://httpip.es/api/pipe/echo:[4,1,7,3,9,2]|sort | |
| Users by name | List users in name order to build a simple directory. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users|sort:name|pick:name,email,phone |