Added reverse op

This commit is contained in:
Mike Farah
2022-02-22 14:15:31 +11:00
parent 2752544bc8
commit 8142e94349
9 changed files with 176 additions and 0 deletions
@@ -0,0 +1,3 @@
# Reverse
Reverses the order of the items in an array
+3
View File
@@ -2,4 +2,7 @@
Sorts an array. Use `sort` to sort an array as is, or `sort_by(exp)` to sort by a particular expression (e.g. subfield).
To sort by descending order, pipe the results through the `reverse` operator after sorting.
Note that at this stage, `yq` only sorts scalar fields.