I have following loop
for (var i in data) {
console.log(data[i])
}
Data that I for loop is iterating through is
"data": [
{
"MainArea": "North West"
},
{
"MainArea": "South West"
},
When I run it I get following output in firebug
[Object { MainArea="North West"},
Object { MainArea="South West"}]
What I am trying to get is just the value of it. So that when I tried
console.log(data[i].MainArea)
Hoping to get just the "North West" and South West" values, instead I get "undefined" in my console.