Merging objects to obtain the average value in arrays
问题 I'm trying to obtain an average value for scores arrays and leave other values from the first object. I can't manage how to loop through the objects to achieve expected output. 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] },