diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-16 14:25:28 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2013-05-16 14:25:28 +0100 |
commit | 919292764a1ba57507ab4c93e732d2037a2ffa14 (patch) | |
tree | 31a52b58b021626b0123c6e8ef94dd518626777b /builtin.c | |
parent | a1e4dfa32412457e03dd0e4e4c2ac17eca02c4f8 (diff) |
Reverse function. Closes #94.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)]];", }; |