I can't insert data into array. I want it as one array. I want to add 12 months in each row. Below is my code:
var data = {};
for (var i = 0; i < 5; i++) {
data[i] = {
Name: "Sample",
Group: "Sample",
Offering: "India",
Type: "Employee",
subject: "Sample",
sponser: true
};
for (j = 1; j <= 12; j++) {
var val = "m" + j;
data.val = j + 1;
}
}
valis a string and so actually you try to set the propertyvalinstead ofm1,m2, ...