My following find
query don't work in lowercase scenario. If the value in collection is capital & which i pass is in lowercase gives no result.
How to override case sensitive behavior?
User.find({
$or:
[
{ 'basicinformation.firstname': { '$regex': firstname + '.*' } },
{ 'basicinformation.lastname': { '$regex': lastname + '.*' } }
]
}