How to make jq treat argument as numeric instead of string?
<p>How to make <code>jq</code> treat an input argument as numeric instead of string? In the following example, <code>CURR_INDEX</code> is a Bash variable which has array index value that I want to extract. </p>

<pre><code>jq --arg ARG1 $CURR_INDEX '.[$ARG1].patchSets' inputfile.json
</code></pre>

<p>I get the following error:</p>

<pre><code>jq: error: Cannot index array with string
</code></pre>

<p>I tried the workaround of using <code>bash</code> <code>eval</code> but some <code>jq</code> filters do not work properly in <code>eval</code> statements.</p>