Merge pull request #366 from slapresta/inversed-contains

Added `in` command
This commit is contained in:
Nico Williams committed 2014-12-26 22:00:41 -06:00
commit 3234a7681e
2 files changed
+42

No files matched your search

+2
View File
@@ -1121,6 +1121,8 @@ static const char* const jq_builtins[] = {
" | reduce range(0; $max) as $j"
" ([]; . + [reduce range(0;$length) as $i ([]; . + [ $in[$i][$j] ] )] )"
" end;",
"def in(xs): . as $x | xs | has($x)",
"def inside(xs): . as $x | xs | contains($x)",
};
#undef LIBM_DD