summaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin.c b/builtin.c
index 47c13865..48d71109 100644
--- a/builtin.c
+++ b/builtin.c
@@ -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)]];",
};