I need to create url for get which is going to accept array, how in node.js/express extract array from request ? I need to pass array with names which parametes I need to ba
Express has a tool to check if your path will match the route you are creating : Express.js route tester.
As Jose Mato says you have to decide how to structure your url:
The http request should look like this, if you chose method 1:
http://baseurl/api/?foo=1&foo=2
Your route should have this logic:
app.get('/api/:person', (req, res) => {
/*This will create an object that you can iterate over.*/
for (let foo of req.params.foo) {
/*Do some logic here*/
}
});