Am working on nestjs and i want to fetch data from the collection on the basis of 'name' value.But i got output like this:
code of services:
async find_one(name):Promise<Usersinterface>{
const data=this.usersmodel.find(name).exec()
return data;
}
code of controller:
@Get('getitem')
async getitem(@Body()name):Promise<any>{
return this.usersService.find_one(name)
}
