What is the best way to merge two arrays into one array of objects, ie: I have two arrays:
dates = ['2020-01-01', '2020-01-15', '2020-02-01'];
values = [0.1, 0.4, 0.8];
and I want to assign to another variable this:
someData = [['2020-01-01', 0.1], ['2020-01-15', 0.4], ['2020-02-01', 0.8]];
edit: I'm courios if there is any more elegant solution than this:
const someData;
this.dates.forEach((value, i )=>{
someData.push([dates[i]],value);
})