-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mongo filter collections #334
Comments
For the filter
Which will not work since |
Hi! we have fixed this using $anyElementTrue. Here files which we patched. Works great. For example: tasks.name:'value' and tasks.technicalName:'value' will find documents where at least one element of tasks matches this filter. |
Hey,
Is it possible to filter collections in Mongo using $elemMatch instead of $match?
For example:
order: {
"tasks": [
{
"name" : "first",
"priority: 5
},
{
"name" : "second",
"priority": 4
}
]
};
The filter will be: "tasks.name":"first" and "tasks.priority":4.
And this filter return this order, because "first" matches first element of array and "4" matches second element of array, but i needed to match filter for element of array, not for whole array.
The text was updated successfully, but these errors were encountered: