express parse get query code example
Example 1: node.js express post query string
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.post('/somepost', (req, res) => {
console.log('Name:', req.query.name);
res.status(200);
});
Example 2: 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)