I am working on nestjs and I want to retrieve data from DB on the basis of name property, which I am passing in a method of services code. The issue is when am passing {"name": "item1"} in postman, am getting item1 related data, but when am passing {"name":"item1","name":"item2"} in postman, I am getting data related to item2 only.I want to retrieve data of both item1, item2, and so on. To overcome this issue I thought rest parameters would be a good choice, but I don't know how to pass rest parameters and how to call rest parameters in postman. The main problem is I don't know how to deal with rest parameters in postman and code too.
Here is the code of services:
async individual(...name:any){
const ind= await this.usersmodel.find({'name':{$in:name}})
return ind
}
Here is the code of controller:
@Post('ind')
async ind(@Body('name')name){
return this.usersService.individual(name)
}

