If I had an array like:
var array = [[1,"GOOG",4],[1,"GOOG",6],[2,"GOOG",4],[2,"FB",4]];
Using javascript, how could I turn it into an array where all the items containing the same second value in array[i][1] (in the example the first 3 have the same value of GOOG and get their third value array[i][2] added together and combined resulting in the following array.
var array = [["GOOG",14],["FB",4]];
Edit: Actually I need all items matching array[i][1] added and combined.