I have an express endpoint, I need to get the query pass from the frontend
const { filterType1, filterType2 } = req.query
the problem is the filterType is from elsewhere, says it's list of array
const list = ['priceFilter', 'ageFilter', 'destinationFilter']
can I do this?
const { list.map(o => o) } = req.query
which means
const { priceFilter , ageFilter, destinationFilter } = req.query