Hello I have this code and It's working
for (let i in list) {
db.push({
name: list[i],
values: []
});
for (let j in data) {
db[i].values.push({
Date: data[j].Date,
count: parseInt(data[j][list[i]])
});
};
db[i].values.pop();
};
Im trying to convert it to this
list.forEach((el, i) => {
db.push({
name: list[i],
values: Array.prototype.call(data.forEach((d, j) => {
this.push({
Date: data[j].Date,
count: parseInt(data[j][list[i]])
});
}))
})
})