title: Merging items of array of object if they have equal keys
body: <h2>Array of objects that I got</h2>
  <pre><code>  [
      {
        &quot;id&quot;: 1,
        &quot;price&quot;: 100
      },
      {
        &quot;id&quot;: 1,
        &quot;price&quot;: 80
      },
      {
        &quot;id&quot;: 2,
        &quot;price&quot;: 8
      },
      {
        &quot;id&quot;: 1,
        &quot;price&quot;: 85
      }
    ]
  </code></pre>
  <h2>Array of objects that I am trying to do</h2>
  <pre><code>  [
      {
        &quot;id&quot;: 1,
        &quot;price&quot;: 88.33 // AVERAGE VALUE BETWEEN DUPLICATED OBJECTS
      },
      {
        &quot;id&quot;: 2,
        &quot;price&quot;: 8
      }
    ]
  </code></pre>
  <p>I am merging and getting the <em><strong>average price for duplicated objects</strong></em>.</p>
  <h2>What I have done:</h2>
  <p>I have tried to use <code>filter()</code> function but I removed the duplicated without merging the prices.</p>