I have the following javascript array:
for(var k in lista) {
for(var x in lista[k]){
var donutData = [
{label: x, data: lista[k][x], color: "#3c8dbc"}
];
}
}
In the end I would like the donutData variable to look like this:
var donutData = [
{label: "Series2", data: 30, color: "#3c8dbc"},
{label: "Series3", data: 20, color: "#F56954"},
{label: "Series4", data: 50, color: "#00A65A"},
{label: "Series4", data: 50, color: "#F39C12"},
{label: "Series4", data: 50, color: "#00C0EF"}
];
Is it possible?