I have defined two JavaScript variables that are arrays into an array like:
var myMondaysImpressionsData = new Array(['2013-01-21', 2015], ['2013-01-28', 2967], ['2013-02-04', 2419], ['2013-02-11', 1311], ['2013-02-18', 1398], ['2013-02-25', 86161], ['2013-03-04', 216865], ['2013-03-11', 105252], ['2013-03-18', 141978], ['2013-03-25', 4647], ['2013-04-01', 46339], ['2013-04-08', 19920]);
and:
var myMondaysImpressionsPaidData = new Array([0], [0], [0], [0], [0], [69428], [186482], [74850], [107281], [0], [32781], [0]);
It's kinda mandatory to use this form because is for further scopes. My issue is that I want to take the values found in the second array and add them like that for example:
var example = new Array(['2013-01-21', 2015, 0], ['2013-01-28', 2967, 0], ['2013-02-04', 2419, 0], ['2013-02-11', 1311, 0], ['2013-02-18', 1398, 0], ['2013-02-25', 86161, 69428], ['2013-03-04', 216865, 186482], ['2013-03-11', 105252, 74850], ['2013-03-18', 141978, 107281], ['2013-03-25', 4647, 0], ['2013-04-01', 46339, 32781], ['2013-04-08', 19920, 0]);
in the first array. Like I said, I have to reach the form shown above in the example variable. How is this possible in JavaScript? What method should be used in this case of scenarios?