title: How to merge (average/sum) duplicated objects in .json via jq?
body: <p>I'm trying to get rid of duplicates that sometimes appear in my input.<br>
  Here is sample of data:</p>
  
  <pre><code>{
    "some": "very",
    "random": 0.228,
    "stuff": 31337,
    "people": [
      {
        "name": "carl",
        "height": "180cm",
        "wifes": 1,
        "sons": 0
      },
      {
        "name": "charlie",
        "height": "166cm",
        "wifes": 0,
        "sons": 2
      },
      {
        "name": "carl",
        "height": "180cm",
        "wifes": 1,
        "sons": 1
      },
      {
        "name": "carl",
        "height": "195cm",
        "wifes": 1.95,
        "sons": 12
      }
    ]
  }
  </code></pre>
  
  <p>There is bunch of carl's, but only 2 of them are duplicates - name:carl &amp; height:180cm.<br>
  For example I need to average amount of his wifes and sum his sons.<br>
  Here is expected result:</p>
  
  <pre><code>[
    {
      "name": "carl",
      "height": "180cm",
      "wifes": 1,
      "sons": 3
    },
    {
      "name": "charlie",
      "height": "166cm",
      "wifes": 0,
      "sons": 2
    },
    {
      "name": "carl",
      "height": "195cm",
      "wifes": 1.95,
      "sons": 12
    }
  ]
  </code></pre>
  
  <p>I tried using 'add' and 'reduce' but I'm pretty newb in jq >&lt;</p>