I'm trying to update a value in a document and i haven't seen an example that shows me what i need to do. Here is how my document looks:
{
"_id" : ObjectId("5429e8a53150d03d541c7a53"),
"foo" : {
"bar" : {
"0" : {
"email" : {
"0" : "bob@aol.com"
}
}
}
}
}
This is of course not my real object but represents the structure. how do i update bob@aol.com to be whatever@whocares.net ?
Also how would i remove this same element?
Also (for bunus points) how would i update this using the php Mongo class?