title: jq: How can I combine data from duplicate keys
body: <p>I have a fairly complex JSON data structure that I've managed to use jq to filter down to certain keys and their values.  I need to combine the results though, so duplicate keys have only one array of values.<br>
  e.g.</p>
  
  <pre><code>     {
      "1.NBT.B": [
        {
          "id": 545
        },
        {
          "id": 546
         }
      ]
    },
    {
      "1.NBT.B": [
        {
          "id": 1281
        },
        {
          "id": 1077
        }
      ]
    }
  </code></pre>
  
  <p>would result in </p>
  
  <pre><code> {
      "1.NBT.B": [
        {
          "id": 545
        },
        {
          "id": 546
         },
        {
          "id": 1281
        },
        {
          "id": 1077
        }
      ]
    },
  ...
  </code></pre>
  
  <p>or even better:</p>
  
  <pre><code>[{"1.NBT.B": [545, 546, 1281, 1077]}, ...]
  </code></pre>
  
  <p>I need to do it without having to put in the key ("1.NBT.B") directly, since there are hundreds of these keys.  I think what has me most stuck is that the objects here aren't named -- the keys are not the same between objects.</p>
  
  <p>Something like this only gives me the 2nd set of ids, completing skipping the first:</p>
  
  <pre><code>reduce .[] as $item ({}; . + $item)
  </code></pre>