I have the following array:
var items = [ {price1: 100, price2: 200, price3: 150}, {price1: 10, price2: 50}, {price1: 20, price2: 20, price3: 13}, ]
I need to get an object with the sum of all the keys, as shown below:
var result = {price1: 130, price2: 270, price3: 163};
I know that I can only use a loop, but I'm looking for an underline style approach :)
source share