Here is dummy JSON:
{
"_ID": ObjectId('xdfdsf'),
"array": [
{
"name": "Jon",
"permissions": [
"update",
"delete",
"create"
]
},
{
"name": "Ben",
"permissions":[
"update"
]
}
]
}
And so on. I want to create a query that will search the array, find element in array which has name "Ben" and pushes new permission into the array.
It's probably relatively simple to do but I got completely lost.