Add the recurse function. See #37.

This commit is contained in:
Stephen Dolan committed 2012-12-29 22:59:07 +00:00
1 parent e0cda536f3
commit b3bad59dd7
2 files changed
+33 -1

No files matched your search

+1 -1
View File
@@ -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));",
};