title: Store value to variable in Shell script
body: <p>"$emails" has the array of values, i want to parse the values from it, To do it, i am using the <a href="http://stedolan.github.io/jq" rel="nofollow">jq</a>. if i do below command</p>
  
  <pre><code>echo "$emails" | ./jq '.total_rows'
  </code></pre>
  
  <p>i could get the value i.e 4, i want to store the returned results into some variable,</p>
  
  <pre><code>total_rows="$emails" | ./jq '.total_rows'
  </code></pre>
  
  <p>but total_rows has no value.</p>
  
  <pre><code>echo $total_rows
  </code></pre>
  
  <p>How do store the returned result into variable?</p>