What is wrong with this query? I tried to run it on mongodb server and received an error as following - \"exception: bad query: BadValue unknown top level operator: $gte\".
You need to include explicitly package in cmd prompt like npm i regex and change in service like as below:
npm i regex
const kidDetails = await this.studentModel.find({ name:{$regex: new RegExp('.*' + studName, 'i') }} );