I am new to jq. I am trying to write a simple script that loops through a JSON file, gets two values within each object and assigns them to two separate variables I can use with a curl REST call. I see both values as output when I echo $i but how can I get value and addr as separate variables?
for i in `cat /Users/egraham/Downloads/test2 | jq .[] | jq ."value,.addr"`; do
do) and the JSON file or at least a short sample?cat /Users/egraham/Downloads/test2 | jq .[] | jq ."value,.addr"; do echo $i done