title: "Invalid numeric literal" error from jq trying to modify JSON with variable
body: <p>I am wanting to pipe values into a bash script that will change values in a json file using jq. I've been working on this for a while now and I can't get past the first set of errors.</p>
  
  <p>Here is my simple json file:</p>
  
  <pre><code>{
      "0000000": {
          "pogo": "AJHVUYKJBOIHKNNLNM"
      },
      "7000000": {
          "pogo": "PPPVUYKJBOIHKNNLNM"
      }
  }
  </code></pre>
  
  <p>Here is my script   </p>
  
  <pre><code>#!/bin/bash
  
  #-- pass into script
  pgid="${1}"
  tpogo="${2}"
  file="file.json"
  
  #-- tmp files
  tmp_dir="$(mktemp -d -t 'text.XXXXX' || mktemp -d 2&gt;/dev/null)"
  tmp_input1="${tmp_dir}/temp_input1.txt"
  
  if [ ! -n "$2" ]; then
     { echo "Check your command as you are missing a variable ..."; echo "Example: script.sh "00000001" "jvkkjbkjbd" ..."; }
     exit 1;
  fi
  
  jq -r ".${pgid}.pogo = \"${tpogo}\"" "$file" &gt; "$tmp_input1"
  cat "$tmp_input1"
  rm -rf "$tmp_dir"
  </code></pre>
  
  <p>Here are the errors:</p>
  
  <pre><code>jq: error: Invalid numeric literal at EOF at line 1, column 9 (while parsing '.0000000.') at &lt;top-level&gt;, line 1:
  .0000000.pogo = "XXXXXXX"
  jq: error: syntax error, unexpected IDENT, expecting $end (Unix shell quoting issues?) at &lt;top-level&gt;, line 1:
  .0000000.pogo = "XXXXXXX"
  jq: 2 compile errors
  </code></pre>
  
  <p>I have tried so many variations from stack and most of them look similar to what I am doing now.</p>