I am building a project using mongodb and php, so my database contains the following record.
{
"_id": {
"$id": "515bb7e2a00b2add0b000001"
},
"user_id": "user_8888",
"events": {
"common test I": {
"subject": "common test I",
"start_date": "04/14/2013",
"start_time": "8.00 AM",
"end_date": "04/14/2013",
"end_time": "10.30 AM",
"all_day_event": "false",
"discription": "no discription",
"location": "STC",
"private": "false",
"time_zone": "IST",
"alarm": "true",
"alarm_threshold": "5",
"status": "true"
}
}
}
So only using query, how I retrieve "common test I" event from the record. The result should be:
{
"subject": "common test I",
"start_date": "04/14/2013",
"start_time": "8.00 AM",
"end_date": "04/14/2013",
"end_time": "10.30 AM",
"all_day_event": "false",
"discription": "no discription",
"location": "STC",
"private": "false",
"time_zone": "IST",
"alarm": "true",
"alarm_threshold": "5",
"status": "true"
}
Is it possible?