diff --git a/builtin.c b/builtin.c index 0c0faa3154..4dc34a593d 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;",