reverse

Array

Reverses the order of an array without sorting. Useful after a sort to flip direction, or to reverse an already-ordered API response.

Syntaxreverse

Use cases

Use caseDescriptionURL
Sort then flipSort ascending then reverse to get a descending list — alternative to rsort.https://httpip.es/api/pipe/echo:[3,1,4,1,5,9,2,6]|sort|reverse
Reverse paginated API resultsWhen an API returns oldest-first, reverse it to get the newest 5 at the top.https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts|tail:10|reverse|pick:id,title
Reverse a repo listFlip the default alphabetical order of a user's repos.https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|sort:name|reverse|pluck:name
Read-last-firstReverse a comment thread to show the most recent reply at the top.https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/comments|filter:postId,eq,1|reverse

All commands