Issue
here is my bash script test.sh
host='select((.tag_name!="dev")
curl -H "Authorization: token <token>" https:<git release url> | jq -r '[.[] | <iwant host variable placed here> ][0].assets[0].browser_download_url'
I want to do something like below
curl -H "Authorization: token <token>" https:<git release url> | jq -r '[.[] | select(.tag_name=="dev" )][0].assets[0].browser_download_url'
Solution
Try this: $(host)
host='select(.tag_name=="dev")'
curl -H "Authorization: token <token>" https:<git release url> | jq -r '[.[] | $(host) ][0].assets[0].browser_download_url'
Answered By - Marcelo Guedes Answer Checked By - Mildred Charles (WPSolving Admin)