Im trying to do a query in mongodb similar to SQL example:
SELECT * from example where contactphone like '4832%';
My first idea was to do something like:
db.example.find({ contactphone: /^4832/ })
but it doesnt return what I am looking for, as contactphone is a number.
Is there any good practices-way to do such operations in mongodb on numbers?
EDIT: phone number may be a bad example. Lets say i need to find all numbers that CONTAIN number digit 9. How can i achive that?