I Want to sum all price values of an array for duplicated elements in array... I have this array:
var products = [["product_1", 6, "hamburger"],["product_2", 10, "cola"],["product_2", 7, "cola"], ["product1", 4, "hamburger"]]
And this is what I want:
var products = [["product_1", 10, "hamburger"],["product_2", 17, "cola"]]
Can any good soul help me?