1
У меня есть следующие структуры данных:Как обновить вложенный поддокумент по условию в MongoDB?
// Journeys collection in MongoDB
{
"_id" : ObjectId("560feabb682290c218770110"),
"title" : "El Camino de Santiago",
"messages" : [
{
"title" : "The sun is strong!",
"text" : "Lorem ipsum and something more text goes here",
"lat" : "-34.5555555",
"lng" : "23.34455335",
"_id" : ObjectId("560feabc682290c218770111")
},
{
"title" : "The hike was great",
"text" : "Lorem ipsum and something more text goes here",
"lat" : "-34.5555555",
"lng" : "23.34455335",
"_id" : ObjectId("560feab9682290c21877010f")
}
],
"followers" : []
}
Как сделать обновление для title
поля сообщения с _id
из 560feab9682290c21877010f
в это конкретное путешествие?