Feature Request: Get parameter position
See original GitHub issueWhile 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.x
.
Example:
/?test1=true&test2=false
req.queryPosition.test1
// => 0
req.queryPosition.test2
// => 1
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to get "GET" request parameters in JavaScript? [duplicate]
just call the function with GET variable name as parameter, eg. get('foo'); ... function getRequests() { var s1 = location.search.substring(1, ...
Read more >Request Parameters in Postman - Tools QA
The server reads the Request parameter from the URL and sends a Response based on the Request Parameter. In our example, Bing will...
Read more >[Feature Request] Support url parameters without router ...
It's only possible to use parameters if they're route parameters. For example, to access name and age, a route must be set up...
Read more >about Functions Advanced Parameters - PowerShell
The Position argument determines whether the parameter name is required when the parameter is used in a command. When a parameter declaration ...
Read more >How to Get URL Parameters with JavaScript - SitePoint
Learn how to parse query string parameters and get their values in JavaScript. Use the results for tracking referrals, autocomplete, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To me this seems like something a third party library should do, not express core. You have direct access to the full url already, so parsing the querystring in this way should be simple.
I’m going to close this because it seems like the conversation has stalled, with no follow up on the questions to move forward.