I have following document sample:
"_id" : ObjectId("5a569c3d093322018b514e31"),
"participants" : [
{
"user" : ObjectId("5a446a6169c8343283bdb1ad"),
"unreadMessages" : [ ]
},
{
"user" : ObjectId("5a4ff9bded4bae532bdd35f9"),
"unreadMessages" : [ ]
}
],
"created" : ISODate("2018-01-11T01:08:39.736Z")
I am given _id(5a569c3d093322018b514e31) and user id(5a446a6169c8343283bdb1ad).
How I can push a text string (test test) into the unreadMessages array of the first element in participants?