While you can retrieve GET parameters using
req.query I’m not familiar with a method to retrieve a parameter’s position.
Let me clarify the use case: I’m building a server that filters a database by given filter parameters, in the same order they are passed. Therefore I need to determine the arrangement of filter parameters.
You probably wouldn’t like to add the position directly to the parameter, e.g.
req.query.x.pos. Therefore my idea is to have a separate array with the positions, e.g.
req.queryPosition.test1 // => 0 req.queryPosition.test2 // => 1