mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-02 23:34:48 +08:00
Added reverse op
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Reverse
|
||||
|
||||
Reverses the order of the items in an array
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user