{
"_id" : ObjectId("5ec0471dfec11a07d80c9d07"),
"name" : "jasper",
"posts" : [
{
"_id" : ObjectId("5ec0473ffec11a07d80c9d08"),
"content" : "It,s all about........",
"title" : "THE NEEDY"
},
{
"_id" : ObjectId("5ec0475afec11a07d80c9d09"),
"content" : "I know..........",
"title" : "The world"
}
],
"__v" : 2
}
There are many users and their data are stored in the form of above schema in MongoDB.I want to update any of the content (i.e consider"I know") then how should I do that using mongoose?? Firstly I tried to get the userId and would get its entire data, then how should I select the Id of posts and make necessary updates?
THANKS FOR YOUR HELP