AWS CLI Query for pulling image from ecs describe-task-definition?

So I’m trying to pull just the image from a task-definition. I’m running:

aws ecs describe-task-definition --task-definition nameoftaskdefinition --output text

And I’m trying add in the –query option so that result will look like

VAR = $(aws ecs describe-task-definition --task-definition nameoftaskdefinition --output text)

where echo $VAR would return image

Source: Docker Questions