Merge pull request #366 from slapresta/inversed-contains
Added `in` command
This commit is contained in:
commit
3234a7681e
2 files changed
+42
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user