Answer the question
In order to leave comments, you need to log in
How to select documents from mongodb where value is in given range?
{ $gte: 6, $lte: 8 };
does not work, apparently because the values are stored in the database as strings
in this case, it gives me documents that start with "6" or "7", for example: "6990", "61990", "7290"
What is better to do in such situation? Perhaps there is a function that will compose a regular expression? or what is faster
Answer the question
In order to leave comments, you need to log in
And it doesn't roll?
Or would it be easier to write string to number
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question