I'm makin an AJAX request like this:
$.ajax({
url: baseurl,
dataType: 'json',
data: {
"id": id
},
type: "POST",
success: function(data) {
console.log(data)
}
});
The variable data
appears in console as:
Object {ids: Array[2], values: Array[2], name: "Test"…}
Expanding it gives:
ids: Array[2]
0: "1417509840"
1: "1419964200"
length: 2
I'm unable to access the ids
array. I can access the name
variable by data.name
, but I cannot access the array elements.