summaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorKim Toms <kim.toms@bplglobal.net>2015-02-10 08:33:56 -0500
committerKim Toms <kim.toms@bplglobal.net>2015-02-10 08:33:56 -0500
commitca78a746e60ba6360bf915e2fe5884c0e04bb858 (patch)
tree116a15e2d34225364dbc2822348f7d8091eb612e /builtin.c
parent1e13e1e06e7f2014cdf03940f4c86dbd74a09c5e (diff)
Enhance from_entries to better deal with Amazon AWS Tags
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index d88c9d77..5ac35cd1 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1036,7 +1036,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 // .Key): (.value // .Value)}) | add | .//={};",
+ "def from_entries: map({(.key // .Key // .Name): (.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]"