Logic confusion when querying data with mongodb

Hello, good morning, I have a problem and I don't know if the query is being performed correctly and this is the query code: const matchingMethods = await PrecioXP.find({ skill: skill, $or: [ { $and: [{ startlevel: { $lte: minLevel } }, { endlevel: { $gte: minLevel } }] }, { $and: [{ startlevel: { $lte: maxLevel } }, { endlevel: { $gte: maxLevel } }] }, { $and: [{ startlevel: { $gte: minLevel } }, { endlevel: { $lte: maxLevel } }] } ] }).sort({ method: 1 });
3 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Tora
ToraOP8mo ago
Just like this image is giving me the results
No description
Tora
ToraOP8mo ago
And the code was being based to do it like this
No description
Want results from more Discord servers?
Add your server