Im trying to query a record from database using this criteria: VITAMINS + ZINC 100MG/10MG PER 5ML SYRUP
This is what my request url looks like:
http://localhost:4200/api/search?key=VITAMINS%20+%20ZINC%20100MG/10MG%20PER%205ML%20SYRUP
Here is my express router looks like:
router.get('/search', (req, res, next) => {
const query = req.query;
console.log(query.key);
.... omitted
});
The problem here is i can't retain the +
special character and thus end up getting this log printed which is not the original criteria inside the router.
VITAMINS ZINC 100MG/10MG PER 5ML SYRUP