[英]Mongo filter/find all elements in embedded array that match a criteria and return surrounding documents?
[英]How do I ask mongo for all the embedded documents that match my criteria?
我有一部電影,而該電影有一個嵌入式文檔評論數組。 我想選擇狀態為= 1的所有評論
{
reviews: [
{
status: 0,
text: 'hello'
}, {
status: 1,
text: 'hi'
}
}, {
... etc ...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.