Hi im having a weird problem i have a query this query.
find({username: "user_1" , words: { $elemMatch: { "word": "RATIONAL", "subwords": "RAT" } }})
and this is the document structure : [1]: https://i.stack.imgur.com/DGGLo.png
when i try this query on mongoDB shell it works perfectly but when i try it on NodeJS it returns me the document based only the username. thanks everyone
To find the matches try running this query:
find({username: "user_1" , "words.word": "RATIONAL", "words.subwords": "RAT" })