how to get query params in node js as object code example
Example 1: expressjs query params
console.dir(req.query.q)
console.dir(req.query.order)
console.dir(req.query.shoe.color)
console.dir(req.query.shoe.type)
console.dir(req.query.color)
Example 2: get query string javascript nodejs
const querystring = require('querystring');
const url = "http://example.com/index.html?code=string&key=12&id=false";
const qs = "code=string&key=12&id=false";
console.log(querystring.parse(qs));
console.log(querystring.parse(url));