Support lowercase name in from_entries (fix #990)
This commit is contained in:
1 parent
32e5e6af4b
commit
c8dc164566
3 files changed
+4
-8
No files matched your search
+1
-1
@@ -1393,7 +1393,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 // .Name): (if has(\"value\") then .value else .Value end)}) | add | .//={};",
|
||||
"def from_entries: map({(.key // .Key // .name // .Name): (if has(\"value\") then .value else .Value end)}) | 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]"
|
||||
|
||||
Reference in new issue
Block a user