This has to be easy, but i can't seem to figure it out... Let say i had a collection users and this is the first item in the collection:
{
"_id" : ObjectId("4d8653c027d02a6437bc89ca"),
"name" : "Oscar Godson",
"email" : "[email protected]",
"password" : "xxxxxx",
"tasks" : [
{
"task" : "pick up stuff",
"comment" : "the one stuff over there"
},
{
"task" : "do more stuff",
"comment" : "lots and lots of stuff"
}
] }
How with the PHP driver for MongoDB would I then go and add another "task" to the "tasks" array in this item in a collection