I am currently pulling data from excel which I then push into an object of array. I am doing so unsing lodash. My code looks like the following :
Output = [];
_.forEachRight(data, element => {
obj = {
MyDate: element.Date,
Cost: element.Cost,
}
Output.push(obj);
});
data = Output;
This takes 27000 milliesseconds for a excel dataset with over 200k entries. My question : Is there a faster way of doing the above. I dont need to use arryas so every other data structure is welcomed.