Skip to content

Commit

Permalink
from-entries should work with EC2 (fix #592)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicowilliams committed Oct 3, 2014
1 parent a0a350f commit 0b29b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand Down

0 comments on commit 0b29b44

Please sign in to comment.