Add the recurse function. See #37.
This commit is contained in:
1 parent
e0cda536f3
commit
b3bad59dd7
2 files changed
+33
-1
No files matched your search
@@ -544,7 +544,7 @@ static const char* jq_builtins[] = {
|
||||
"def del(f): delpaths([path(f)]);",
|
||||
"def _assign(paths; value): value as $v | fold . as $obj (path(paths) as $p | $obj | setpath($p; $v));",
|
||||
"def _modify(paths; update): fold . as $obj (path(paths) as $p | $obj | setpath($p; getpath($p) | update));",
|
||||
|
||||
"def recurse(f): ., (f | select(. != null) | recurse(f));",
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user