title: How to add bash variable to json file?
body: <p>I have a <code>daemon.json</code> file which contains one line as below</p>
  
  <pre><code>{ "insecure-registries":["192.X.X.X:8123"] }
  </code></pre>
  
  <p>I am trying to use a variable to change generically to the current IP address. In bash script normally
  I'd store in a variable like</p>
  
  <pre><code>  myip=hostname -I | awk '{print $1}'
   { "insecure-registries":["$myip:8123"] }
  </code></pre>
  
  <p>How to use a kind of variable in JSON file? </p>