jq - How to select objects based on a 'whitelist' of property values
<p>Since an example is worth a thousand words, say I have the following JSON stream:</p>

<pre><code>{"a": 0, "b": 1}
{"a": 2, "b": 2}
{"a": 7, "b": null}
{"a": 3, "b": 7}
</code></pre>

<p>How can I keep all the objects for which the <code>.b</code> property is one of <code>[1, 7]</code> (in reality the list is much longer so I don't want to do <code>select(.b == 1 or .b == 7)</code>). I'm looking for something like this: <code>select(.b in [1, 7])</code>, but I couldn't find what I'm looking for in the man page.</p>