]> granicus.if.org Git - jq/commitdiff
recurse (i.e., ..) needs to find leaf nulls
authorNicolas Williams <nico@cryptonector.com>
Fri, 27 Jan 2017 21:51:06 +0000 (15:51 -0600)
committerNicolas Williams <nico@cryptonector.com>
Mon, 30 Jan 2017 20:11:05 +0000 (14:11 -0600)
src/builtin.jq

index 223cdcad22367f9f6fbb4127da445310c5516277..d6cd43212732069bfc93df551ffb9c630ddf213d 100644 (file)
@@ -14,7 +14,7 @@ def _modify(paths; update): reduce path(paths) as $p (.; setpath($p; getpath($p)
 def map_values(f): .[] |= f;
 
 # recurse
-def recurse(f): def r: ., (f | select(. != null) | r); r;
+def recurse(f): def r: ., (f | r); r;
 def recurse(f; cond): def r: ., (f | select(cond) | r); r;
 def recurse: recurse(.[]?);
 def recurse_down: recurse;