summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2017-06-19 10:55:26 -0400
committerGitHub <noreply@github.com>2017-06-19 10:55:26 -0400
commit7b81a836c31500e685d043729259affa8b670a87 (patch)
tree7f932f04ae055fe230abbf9beb9d68dc4683d8d4
parentc538237f4e4c381d35f1c15497c95f659fd55850 (diff)
parentca12bd9b5d15c0c4e5bd01d706ddbb3f4edefd36 (diff)
Merge pull request #1403 from Argoday/master
Use unsorted keys in walk
-rw-r--r--src/builtin.jq2
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