mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-30 17:21:42 +00:00
Add the `in` operator to check if a value is present in a mapping (as a key) or sequence (as an element). This mirrors jq's `in` operator which is defined as the inverse of `has`. Usage: . as $m | "key" | in($m) -- check map key existence . as $m | "value" | in($m) -- check array value membership .[] | select(.type | in(["a","b"])) -- filter by membership Fixes #2322 |
||
|---|---|---|
| .. | ||
| yqlib | ||