Home > database >  Query mongdb embedded array
Query mongdb embedded array

Time:10-11

Recent study mongo, a little problems
Mongo works in the collection content is as follows:

{
"_id" : ObjectId (" 5 eb189fa3a80831d5a4a1164 "),
"ID" : "W9903,"
"Title" :
{
"Sect" : "bio rtag gi zin ris bsdus pa",
"Type" : "bibliographicalTitle
"}
]
}
{
"_id" : ObjectId (" 5 eb189fa3a80831d5a4a1165 "),
"ID" : "W9905,"
"Title" :
{
"Sect" : "pa bio rtag gi zin ris bsdus pa",
"Type" : "bibliographicalTitle
"}
]
}
I want to query only returns to each document such as {" sect ":" bio rtag gi zin ris bsdus pa "} in the form of data, how to set the query, thank you for help!

CodePudding user response:

To unwind, the projection to specify the title. Sect
  • Related