diff options
author | William Langford <wlangfor@gmail.com> | 2017-06-19 10:55:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 10:55:26 -0400 |
commit | 7b81a836c31500e685d043729259affa8b670a87 (patch) | |
tree | 7f932f04ae055fe230abbf9beb9d68dc4683d8d4 | |
parent | c538237f4e4c381d35f1c15497c95f659fd55850 (diff) | |
parent | ca12bd9b5d15c0c4e5bd01d706ddbb3f4edefd36 (diff) |
Merge pull request #1403 from Argoday/master
Use unsorted keys in walk
-rw-r--r-- | src/builtin.jq | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin.jq b/src/builtin.jq index 1a5d1e94..9c543a93 100644 --- a/src/builtin.jq +++ b/src/builtin.jq @@ -284,7 +284,7 @@ def bsearch(target): def walk(f): . as $in | if type == "object" then - reduce keys[] as $key + reduce keys_unsorted[] as $key ( {}; . + { ($key): ($in[$key] | walk(f)) } ) | f elif type == "array" then map( walk(f) ) | f else f |