I have to create an array in the following format
var myData = [
{
x: "10:00",
y: [15, 30],
},
];
Where my code looks like
myData.push({
x: startingHoursToPush + ":00",
y: "[" + startingHours[1] + "," + endingHours[1] + "]",
});
but the result I get is as following
x: "11:00"
y: "[15,30]"
I need to make the values for y an array instead of a string
"["does not do what you think it does.[and]without quotes to declare an array-literal.