title: In jq update json when passing value as a variable
body: <p>The variable <code>$task_definition</code> contains json content. I need to update a specific value in that json. The variable <code>$docker_image</code> contains value of the image name. When the below script gets executed it puts the variable name and not the value of the variable <code>$docker_image</code>.  How do I make it put the value of the variable.</p>
  <pre><code>jq '.taskDefinition.containerDefinitions[0].image = &quot;$docker_image&quot;' &lt;&lt;&lt; &quot;$task_definition&quot; &gt; task-definition.json
  </code></pre>
  <p>output:</p>
  <pre><code>{
    &quot;taskDefinition&quot;: {
      &quot;taskDefinitionArn&quot;: &quot;arn:aws:ecs:us-east-1:123454566788:task-definition/nodejs-webapp:21&quot;,
      &quot;containerDefinitions&quot;: [
        {
          &quot;name&quot;: &quot;webapp&quot;,
          &quot;image&quot;: &quot;$docker_image&quot;,
        }
      ]
    }
  }
  </code></pre>