title: Escaping a symbol in jq expression in a shell script
body: <p>I have two variables <code>var1</code> and <code>var2</code> exported in my shell.</p>
  
  <pre><code>var1=root 
  var2=webserver
  </code></pre>
  
  <p>I want a jq query which can replace a JSON key with the given value in the JSON file. something like that,</p>
  
  <pre><code>jq -r --arg var1 $var1 --arg var2 $var2 '(.[].appId=$var1-$var2)' service.json
  </code></pre>
  
  <p>It is giving error that var1 and var2 can't be subtracted. But i want the variable to be replaced with <code>$var1-$var2</code> as a string. </p>
  
  <p>I tried with <code>"-"</code>, But it's giving compilation error. </p>
  
  <p>service.json content is following.</p>
  
  <pre><code>[ {
        "appId": "Eternal Flame",
        "age": 1000000,
        "secretIdentity": "Unknown",
        "powers": [
          "Immortality",
          "Heat Immunity",
          "Inferno",
          "Teleportation",
          "Interdimensional travel"
        ]
      } ]
  </code></pre>
  
  <p>appId value should be replaced with "root-webserver"</p>