builtin.jq: def pick(pathexps):
Change the name of the formal parameter.
This commit is contained in:
1 parent
416e8ada7d
commit
37225a9a07
1 file changed
+3
-3
+3
-3
@@ -260,10 +260,10 @@ def walk(f):
|
||||
else f
|
||||
end;
|
||||
|
||||
# stream should be a stream of dot-paths
|
||||
def pick(stream):
|
||||
# pathexps could be a stream of dot-paths
|
||||
def pick(pathexps):
|
||||
. as $in
|
||||
| reduce path(stream) as $a (null;
|
||||
| reduce path(pathexps) as $a (null;
|
||||
setpath($a; $in|getpath($a)) );
|
||||
|
||||
# SQL-ish operators here:
|
||||
|
||||
Reference in new issue
Block a user