from-entries should work with EC2 (fix #592)

This commit is contained in:
Nicolas Williams committed 2014-10-03 17:47:13 -05:00
1 parent a0a350f468
commit 0b29b44cab
1 file changed
+1 -1
+1 -1
View File
@@ -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;",