When I run the below command I get this
aws ecs describe-tasks --cluster $clusterName --tasks $tasks | jq -r \'.tasks[]| select(.group | contains( "\'$