title: lodash - How to convert a nested object into a unique array?
body: <p>I have this array with a nested "<code>atts</code>" object in an array of <code>items</code>.</p>
  
  <pre><code>baseData = [
      {
          id: 123123
          name: "Some Product"
          atts: {
              lowfreqrange: 100,
              package: 'connector',
              amplifier: 'narrowband'
          }
      },
  
      {
          id: 5556652
          name: "Some Second Product"
          atts: {
              lowfreqrange: 50,
              package: 'drop-in',
              amplifier: 'LNA'
          }
      },
  
      {
          id: 5465456
          name: "Some 2 Product"
          atts: {
              lowfreqrange: 100,
              package: 'connector',
              amplifier: 'narrowband'
          }
      }
  ]
  </code></pre>
  
  <p>and I'd like the output to be:</p>
  
  <pre><code>[
      lowfreqrange: [100, 50]
      amplifier: ['LNA', 'narrowband']
      package: ['connector', 'drop-in']
  ]
  </code></pre>
  
  <p>Is there a quick way to handle this with lodash other than manual looping? I have this but would like to see how I could do it with lodash, mostly for educational purposes:</p>
  
  <pre><code>for item in baseData
      atts = item.atts
  
      for k, v of atts
          result[k] = [] unless result[k]
          result[k].push v
  </code></pre>