I have perform like query in mongodb. I have following document in employee collection as:
{
   "_id" :1
   "name":"Abc",
   "salary": 56789.98456
 }
So far,I have performed like query to match the above employee document. I have tried following queries in mongo:
db.employee.find({"salary":/.*56789.98.*/}).pretty()
db.employee.find({"salary":/^56789.98/}).pretty()
db.employee.find({"salary":/56789.98/}).pretty()
But it doesn't work. I also looked at: How to query MongoDB with "like"?
How do I achieve this in mongo ?
 
     
    