title: Merging objects to obtain the average value in arrays
body: <p>I'm trying to obtain an average value for <em>scores</em> arrays and leave other values from the first object. I can't manage how to loop through the objects to achieve expected output.</p>
  
  <pre><code>const bigArr = [
    {
      bigDummyData: "string0",
      examples: [
        { smallDD: "string00", scores: [1, 1, 5] },
        { smallDD: "string01", scores: [2, 2, 4] },
        { smallDD: "string02", scores: [2, 2, 6] },
      ],
    },
    {
      bigDummyData: "string1",
      examples: [
        { smallDD: "string10", scores: [3, 3, 3] },
        { smallDD: "string11", scores: [2, 2, 2] },
        { smallDD: "string12", scores: [4, 4, 4] },
      ],
    },
  ]
  </code></pre>
  
  <p>Expected output its:</p>
  
  <pre><code>output = {
      bigDummyData: "string0",
      examples: [
        { smallDD: "string00", scores: [2, 2, 4] },
        { smallDD: "string01", scores: [2, 2, 3] },
        { smallDD: "string02", scores: [3, 3, 5] },
      ],
    }
  </code></pre>
  
  <p>As you can see, bigDummyData and each smallDD are left from the first object.</p>
  
  <p><strong>That's is a simplified example of the problem</strong>, arrays <em>bigArr</em> and <em>examples</em> are uploaded dynamically, so they are usually much longer.</p>