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" : []
}
我如何與560feab9682290c21877010f
的_id
的更新消息的title
領域這個特定的旅程?