I'm trying to use javascript to iterate over an object and sum the values of a property grouping by the value of another property. Here is my example data that I am iterating over:
63.450,     2013-01-01 00:00:00,    63.450,     2013,   Amex Residuals
3.980,      2013-01-01 00:00:00,    3.980,      2013,   Gift Cards on Demand
-16.000,    2013-01-01 00:00:00,    -16.000,    2013,   Month End Fee Rejects
67.140,     2013-02-01 00:00:00,    67.140,     2013,   Amex Residuals
-600.000,   2013-02-01 00:00:00,    -600.000,   2013,   Bonus Take Back - Closed Less Than 6 Months
-400.000,   2013-02-01 00:00:00,    -400.000,   2013,   Bonus Take Back - Did Not Activate
8.910,      2013-02-01 00:00:00,    8.910,      2013,   Checks On Demand
13997.770,  2013-02-01 00:00:00,    13997.770,  2013,   Global Report
-15.000,    2013-02-01 00:00:00,    -15.000,    2013,   Merchant Adjustments
-34.500,    2013-02-01 00:00:00,    -34.500,    2013,   Month End Fee Rejects
The data continues to include other months (through october) in the second column. I need to sum all the values in the first column together for each distinct month, as well as create a javascript date from the 4th column year, so the result should be something like this:
var data = [ [Date.UTC('2013', i, 1), parseFloat('51.43')], [Date.UTC('2013', i, 1), parseFloat(13024.32)] ]; 
Essentially I should end up with a 2 element array for each month total tupled with a date object from the 4th column. I'm just not sure how to do the iterations for summing on the conditional grouping of the 2nd column (date).
