I have an array with tags which is part of a document, eg
[“red”, “green”, “blue”, “white”, “black”]
Now I want to find all documents, which have red AND blue.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the $all condition to find records that match both “red” and “blue” conditions.
If you want records that match either “red” or “blue” then you can use the $in condition.