From 0b29b44cab83ed7730c8b9d20c026367cc710a7e Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 3 Oct 2014 17:35:01 -0500 Subject: from-entries should work with EC2 (fix #592) --- builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin.c b/builtin.c index 0c0faa31..4dc34a59 100644 --- a/builtin.c +++ b/builtin.c @@ -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;", -- cgit v1.2.3