I have a collection with documents which looks like this:
_id1:
Price:[1,100000]
_id2:
Price:[1,98500]
_id3:
Price:[1,3005]
..etc
Following this documentation: https://docs.mongodb.com/manual/reference/operator/query/elemMatch/
I tried reproduce the find for elements which are in a certain price range but unfortunately it doesn't work for me, I get back all of my elements even though they are not matching the criteria. What am I doing wrong?
My query:
{ Price:{ $elemMatch: { $gte: 1, $lt: 85 } } }