'json file data change

I am using aws-cli for deploying some task on ecs . For ecs to run it needs an image name.(docker concept). So I have defined it in json file . Let's say task.json and here is the command that I use to make json file along with output .

aws ecs register-task-definition --cli-input-json file://<path_to_json_file>/sleep360.json

and output generated is in json format here is what's generated

{
    "containerDefinitions": [
        {
            "name": "sleep",
            "image": "busybox",
            "cpu": 10,
            "command": [
                "sleep",
                "360"
            ],
            "memory": 10,
            "essential": true
        }
    ],
    "family": "sleep360"
}

I want to change the image name using only jq and nothing else.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source