"$emails" has the array of values, i want to parse the values from it, To do it, i am using the jq. if i do below command
echo "$emails" | ./jq '.total_rows'
i could get the value i.e 4, i want to store the returned results into some variable,
total_rows="$emails" | ./jq '.total_rows'
but total_rows has no value.
echo $total_rows
How do store the returned result into variable?