title: How to make the simplest jq filter query work?
body: <p>A very simple</p>
  <pre><code>echo '{&quot;nodes&quot;:[{&quot;id&quot;:&quot;1&quot;}]}' | jq '.nodes[?(@.id==&quot;1&quot;)]'
  </code></pre>
  <p>fails due to</p>
  <pre><code>jq: error: syntax error, unexpected '?' (Unix shell quoting issues?) at &lt;top-level&gt;, line 1:
  .nodes[?(@.id==&quot;1&quot;)]       
  jq: 1 compile error
  </code></pre>
  <p>The hint &quot;Unix shell quoting issues?&quot; doesn't apply because everything is <code>'</code> quoted. However, I tried various unnecessary combinations of simple and double quotes and escaped versions thereof combined with escaping of <code>[</code>, <code>[</code>, <code>@</code> and <code>?</code>.</p>
  <p><code>echo '{&quot;nodes&quot;:[{&quot;id&quot;:&quot;1&quot;}]}' | jq '.nodes'</code> works as does <code>echo '{&quot;nodes&quot;:[{&quot;id&quot;:&quot;1&quot;}]}' | jq '.nodes[0]'</code>, so the error must be in the filter expression which is very simple, seen like this in dozens of examples and which I'm using in integration tests with the <a href="https://github.com/json-path/JsonPath" rel="nofollow noreferrer">Jayway JsonPath library</a>.</p>
  <p>I'm using jq 1.6 on Ubuntu 21.04.</p>