When I do this: http://localhost/?test[]=1&test[]=2, it works just fine for me. req.query contains:
{ test: [ '1', '2' ] }.
In fact, http://localhost/?test=1&test=2 also generates the same
{ test: [ '1', '2' ] }
result for me. I'm running Express 4.17.1. So, if you have the proper Express configuration, it will work.
Notice also, that I'm getting the results as strings and you are getting the results as numbers so you are apparently not using the default Express parsing for query parameters.
Something in your express configuration must have a different setting for how query parameters are parsed.
/?in'/users/?'?'/users'http://localhost/?test[]=1&test[]=2, it works just fine for me.req.querycontains:{ test: [ '1', '2' ] }. In fact,http://localhost/?test=1&test=2also generates the same{ test: [ '1', '2' ] }result for me. I'm running Express 4.17.1.