How to retrieve the documents whose values ending with a particular character in mongoDB How to retrieve the documents whose values ending with a particular character in mongoDB mongodb mongodb

How to retrieve the documents whose values ending with a particular character in mongoDB


In Javascript shell, use $regex operator

db.employee.find({name: {$regex: "i$"}})