This example will download the jpeg file getting the address of image from json response on the first command
To perform this is necessary use the jq and xargs commands
The jq helps to get the address of image on thumbnail attribute from json response of the first curl
The xargs put the output from jq on second curl command
curl -s -X GET https://dummyjson.com/products/1 | jq '.thumbnail' | xargs curl -O