I have this command that is working..
cat ~/Desktop/results.json | jq \'.[] | .environmentStatuses[].deploymentResult | select(.key.entityKey.key==\"39583746-3
This worked for me :
jq '.[] | .environmentStatuses[].deploymentResult | select(.key.entityKey.key == "'$key'") | .lifeCycleState' ~/Desktop/results.json
--arg does not works as expected ...
--arg