mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Reverse function. Closes #94.
This commit is contained in:
@@ -562,6 +562,7 @@ static const char* const jq_builtins[] = {
|
||||
"def to_entries: [keys[] as $k | {key: $k, value: .[$k]}];",
|
||||
"def from_entries: map({(.key): .value}) | add;",
|
||||
"def with_entries(f): to_entries | map(f) | from_entries;",
|
||||
"def reverse: [.[length - 1 - range(0;length)]];",
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user