Answers for "how to $and two $elemMatch in mongodb"

0

how to $and two $elemMatch in mongodb

find({
    $and: [
         {'vitamins': {'$elemMatch': {'name': 'A1', 'state': 'non_free'} } },
         {'vitamins': {'$elemMatch': {'name': 'B7', 'state': 'free'} } }
    ]
});
Posted by: Guest on March-31-2022

Code answers related to "how to $and two $elemMatch in mongodb"

Browse Popular Code Answers by Language