We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
When using
[ { "_id": 1, "name": "Player 1", "might": 2, "endurance": 7, "inventory": [ { "name": "Battery", "desc": "A battery", "qty": 2 }, { "name": "Rations", "desc": "Food", "qty": 2 } ] } ]
this query works in the playground you provide
{ "$and": [ { "inventory": { "$elemMatch": { "name": "Battery", "qty": { "$gte": 2 } } } }, { "inventory": { "$elemMatch": { "name": "Rations", "qty": { "$gte": 1 } } } } ] }
but it doesn't work in my local setup using Vue, but this one works
{ $and: [ { inventory: { $and: [ { name: "Battery" }, { qty: { $gte: 2, }, }, ], }, }, { inventory: { $and: [ { name: "Rations" }, { qty: { $gte: 1, }, }, ], }, }, ], }
Anything that I am doing wrong?
const collection = db.collection(aw.who); const result = collection.find(test); //test is the queries above
Thank you
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
When using
this query works in the playground you provide
but it doesn't work in my local setup using Vue, but this one works
Anything that I am doing wrong?
Thank you
The text was updated successfully, but these errors were encountered: