This is my JSON from PHP:
{"data" :
[
{
"_id" : {
"$id" : "4f977259b1445dce24000000"
},
"headline" : "asdfasdf",
"date" : {
"sec" : 1333584000,
"usec" : 0
},
"text":"asdfasdfas"
}
]
}
In Javascript I want to use the values and it works fine with
obj = JSON.parse(request);
console.log(obj.data[i].headline);
But how do I get the ObjectId?
It does not work like this:
console.log(obj.data[i]._id.$id);