Use unsorted keys in walk

Preserve key sorting order when executing in walk, if sorted keys is desired `--sort-keys` should be used to explicitly obtain sorted keys.
This commit is contained in:
Jonathan Word authored and GitHub committed 2017-05-03 15:49:21 -04:00
1 parent 6d89e297fe
commit ca12bd9b5d
1 file changed
+1 -1
+1 -1
View File
@@ -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