I have the following valid JSON
[
{
"series": [
{
"name": "Comp",
"data": [
753,
384,
864,
654
],
"color": "#FFAC3F"
},
{
"name": "Ind",
"data": [
642,
456,
983,
564
]
},
{
"name": "Store",
"data": [
832,
243,
646,
777
],
"color": "#FF0000"
}
]
}
]
I want to return all the data inside "series" but doing something like say assigning this to a variable and then using data.series is not returning anything. How would I do this using jquery or javascript? This data is actually getting returned in a jquery JSON ajax request like so....
$.getJSON(url, function(data) {
$.getJSON(), you don't have to parse it at all. The parsed object is passed to your callback function ready-to-use.