How can I create mongodb query, which returns all documents that matches query but can contain one letter diff
For example if I have these documents
{ username: "john", age: 15 },
{ username: "jack", age: 15 },
{ username: "gor", age: 15 },
{ username: "test", age: 15 },
And want to make query like this
db.user.find({
username: "johm"
})
It should return first document.
Thank you.