How to organize the search on the site?

There is a site on the search form:
http://127.0.0.1/search/query?id=1;type=items;role=user;

How do I get from this string value id, type, role?
Ie for example I want a mechanism which will give me everything that comes from theid= and until ;
July 9th 19 at 10:37
1 answer
July 9th 19 at 10:39
Solution
Server express? And what a strange delimiter ";"? Should be "&", then there will be search options in req.query lie.
Thank you, it works - Maynard_Schiller commented on July 9th 19 at 10:42
In fairness, you can own querystring to parse, if you want something:) - genevieve_Upton commented on July 9th 19 at 10:45
: Yes, no question )))But what if acarapi? - Kameron_Hilpert34 commented on July 9th 19 at 10:48
: for example, sometimes you need to parse the requests from a thread legacy client, written a hundred years ago in VB/deltah/ExtJS, rewrite no one wants and can not, and the backend needs to be updated. - genevieve_Upton commented on July 9th 19 at 10:51
: it happens. Well, in the case of a simple express middleware to write in 5 lines and all )) - Kameron_Hilpert34 commented on July 9th 19 at 10:54
: well, here I am talking about, Yes. - genevieve_Upton commented on July 9th 19 at 10:57

Find more questions by tags Node.jsJavaScript