title: jq merge two json files and create a key as the filename for each in merged file
body: <p><strong>Question</strong>: </p>
  
  <p>How do you merge multiple JSON files using jq. Each of the merged objects must have their own key name in the final merged file.</p>
  
  <p><strong>file1.json</strong> :</p>
  
  <pre><code>{
    "shoe": 0,
    "temp": "10"
  }
  </code></pre>
  
  <p><strong>file2.json</strong>:</p>
  
  <pre><code>{
    "num": {
      "sock": 0,
      "ratio": {
        "cat": 100,
        "dog": 0
      }
    },
    "hair": "blue"
  }
  </code></pre>
  
  <p><strong>Desired merged output</strong>:</p>
  
  <pre><code>{
    "file1": {
      "shoe": 0,
      "temp": "10"
    },
    "file2": {
      "num": {
        "sock": 0,
        "ratio": {
          "cat": 100,
          "dog": 0
        }
      },
      "hair": "blue"
    }
  }
  </code></pre>
  
  <p>Attempt 1:
  The issue with the below is that the objects hierarchy is merged if that makes sense:</p>
  
  <pre><code>jq --slurp 'add' file1.json file2.json
  </code></pre>
  
  <p><strong>Attempt 1 Output (not what I want)</strong>:</p>
  
  <pre><code>{
    "shoe": 0,
    "temp": "10"
    "num": {
      "sock": 0,
      "ratio": {
        "cat": 100,
        "dog": 0
      }
    },
    "hair": "blue"
  }
  </code></pre>