In my JavaScript code, I am working with two arrays:
"total":[[1370923200000,"66"],[1371009600000,"42"],[1371096000000,"23"]]
"successful":[[1370923200000,"5"],[1371096000000,"2"],[1371182400000,"0"]]
My goal is to merge these two arrays into a single array or object that looks like this:
{date:1370923200000, total:"66", successful:"5"},
{date:1371009600000, total:"42"},
{date:1371096000000, total:"23", successful:"2"},
{date:1371182400000, successful:"0"}
I have attempted various approaches to achieve this by iterating through both arrays, but I'm struggling to find an efficient solution.