title: shell script to parse a json and storing values as array
body: <p>here i am parsing a json file and storing values as array.</p>
  <pre><code>arr1=(`jq '.animal.names'  123.json | sed...`)
  </code></pre>
  <p><em><strong>output: fox tiger lion</strong></em></p>
  <p>now i need to parse values dynamically (i = birds or fish)</p>
  <pre><code>eg    arr1=(`jq .$i.names  123.json | sed...`)
  </code></pre>
  <pre><code>it should be as 
  
  arr1=(`jq '.bird.names'  123.json | sed...`) 
  or      
  arr1=(`jq '.fish.names'  123.json | sed...`).
  </code></pre>
  <p>Some guidance will be helpful.</p>