How do I make this query in mongoDB?
{
_id: "*******"
content: "",
comments: [
{
key1: "1",
key2: "2"
},
{
key1: "sdfs",
key2: "sdfasdf"
}
]
}
For example, I use the data as below. I want to query the items in comments in condition {key1: 1, key2: 2}, and not return the whole record.
What should I do?