-
Notifications
You must be signed in to change notification settings - Fork 83
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
Nested Arrays #19
Comments
I think your query should be valid but I have to confirm it with MongoDB's behaviour. I remember there were some limitations with the level of nesting in array queries but the current MongoDB version is 3.0 so things might work differently. Anyway an equally viable alternative for what you are trying to achieve would be to use the |
Thanks - I’m not sure $elemMatch will work with this dataset though, since in some cases the value will be an object and and in some the same key will have an array of objects as the value (depending on how many children there are). I don’t have control over the data format, so one of the nice things about the mongo dot notation is that the same query should work in both cases. Do you know if there is a way to use $elemMatch or another operator to handle this use case? |
In that case you could use an
I will look into the bug soon. |
Just release 0.6.1 that fixes the issue. |
Thanks! That was faster than I could implement a work around :). |
Hi,
It looks like mingo doesn't correctly return values in nested arrays. For example, with this data set:
The expression
{"key0.key1a.key2a": "value2a"}
returns the object, while the expression{"key0.key1.key2": "value2"}
returns an empty array. Am I constructing the query wrong?Thanks,
Dan
The text was updated successfully, but these errors were encountered: