My contents of MongoDB(when i used find()) is like this:
{ "_id" : ObjectId("50072b17b4a6de3b11000001"), "addresses" : [
{
"_id" : ObjectId("50072b17b4a6de3b11000004"),
"address1" : "770 27th Ave",
"address2" : null,
"city" : "San Mateo",
"country" : "United States",
"country_code" : "US",
"name" : "home",
"primary" : true,
"state" : "California",
"zip" : "94403"
}
], "biography" : null, "category_ids" : [ ], "department" : null, "emails" : [
{
"_id" : ObjectId("50072b17b4a6de3b11000003"),
"_type" : "Email",
"name" : "work",
"email" : "[email protected]"
}
] }
What I need to do is I need to update this MongoDB with additional datas's. For that I need to get the values in php as an array and insert that array in to this collection. How to get the values for these specified fields as an array in php and how to insert those in php??