can somebody tell me please how to find items in Mongodb array which contains more than 2 items with specific value? For example if I have two documents like this:
{
someArray: [
{'aaa' => 1},
{'aaa' => 1}
]
}
{
someArray: [
{'aaa' => 1},
{'aaa' => 2}
]
}
I need to find the first document which contains two items which 'aaa' value is 1. I dont mean $elemMatch I need to count the number of the matched items. Thanks for any help.