diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-10-03 17:35:01 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-10-03 17:47:13 -0500 |
commit | 0b29b44cab83ed7730c8b9d20c026367cc710a7e (patch) | |
tree | 9aae1e0bf1f0b66950411f5a108178468d5b3ee1 /builtin.c | |
parent | a0a350f46808229bb25fe16ca8e82e4c2fe76d7c (diff) |
from-entries should work with EC2 (fix #592)
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -970,7 +970,7 @@ static const char* const jq_builtins[] = { "def recurse_down: recurse;", "def to_entries: [keys_unsorted[] as $k | {key: $k, value: .[$k]}];", - "def from_entries: map({(.key): .value}) | add | .//={};", + "def from_entries: map({(.key // .Key): (.value // .Value)}) | add | .//={};", "def with_entries(f): to_entries | map(f) | from_entries;", "def reverse: [.[length - 1 - range(0;length)]];", "def indices($i): if type == \"array\" and ($i|type) == \"array\" then .[$i] elif type == \"array\" then .[[$i]] else .[$i] end;", |