Here is a sample route:
server.get("/something/best-shoes-in-india-:brand-:location", (req, res) => {
res.send(JSON.stringify(req.params))
})
For example, if brand name = adidas and location = Delhi:
If the URL is => "/something/best-shoes-in-india-adidas-delhi it returns => { brand: adidas, location: delhi } which is correct. However,
If the brand name is => adi das, and location = delhi then the URL becomes => "/something/best-shoes-in-india-adi-das-delhi
Now it returns => { brand: adi, location: das-delhi }
How can we achieve "adi-das" as the brand name in this case?enter code here