bash get jq output in variable code example
Example: bash jq output to a variable
content=$(curl -s -X GET -H "Header:Value" http://127.0.0.1:8200/etc)
username=$( jq -r '.data.value' <<< "${content}" )
echo "${username}"
content=$(curl -s -X GET -H "Header:Value" http://127.0.0.1:8200/etc)
username=$( jq -r '.data.value' <<< "${content}" )
echo "${username}"