title: jq script with back tick in JSON value
body: <p>I'm using jq inside a bash script, to parse a JSON returned by an API REST service</p>
  
  <p>This is my code (getting .count value)</p>
  
  <pre><code># getAPIId
  # Parse the answer of query API to get the API ID (checking version name)
  # return (echo to stdout) the APIID
  function getAPIId() {
      local apiId
      local version
      local -i count          
  
      if [ -z $1 ]
      then
          echo "Use: getAPIId \$apiQuery" &gt;&amp;2
          exit 1
      else    
          # Parse answer to API info
          count=$(echo "$1"|jq -r '.count')
          if [ "$count" == "0" ]
          then
              echo $1 &gt;&amp;2
              echo "ERROR: Cannot find an API called ${APINAME}" &gt;&amp;2
              return 1
          else
              for ((i=0; i&lt;count; i++))
              do
                  version=$(echo $1|jq -r '.list['$i'].version')
                  if [ "$APIVERSION" == "$version" ] &amp;&amp; [ "$APINAME" == "$name" ]
                  then
                      apiId=$(echo $1|jq -r '.list['$i'].id')
                      echo "$apiId"
                      return 0
                  fi
              done
          fi
      fi
      return 1
  
  }
  </code></pre>
  
  <p>This is the JSON file I try to parse</p>
  
  <pre><code>{"count":1,"next":"","previous":"","list":[{"id":"6d2822e5-a90d-4738-b7b7-ef7d7848cb48","name":"SwaggerPetstore",
  "description":"`special key`","context":"/v2","version":"1.0.0","provider":"admin","status":"CREATED","thumbnailUri":null}],"pagination":{"total":1,"offset":0,"limit":25}}
  </code></pre>
  
  <p>As you see, the field description contains back tick value. In this case, jq fails and return empty string (as not found value for count)</p>
  
  <p>How can avoid the problem with backtick?</p>