Dodać wartość do każdego obiektu w tablicy JavaScript
var labels = ["DESKTOP", "MOBILE", "TABLET"];
var chartData = ["100", "10", "15"];
var myData = [];
labels.forEach(function(e, i) {
myData.push({
label: e,
data: chartData[i]
})
})
document.write(JSON.stringify(myData));
Jumping Boy