nodejs bodyparser form data

JavaScript
const express = require('express')
const app = express()

app.use(express.urlencoded())
var bodyParser = require('body-parser');
var multer = require('multer');
var forms = multer();

// apply them

app.use(bodyParser.json());
app.use(forms.array()); 
app.use(bodyParser.urlencoded({ extended: true }));

// how to use

router.post('/', function(req, res) {
    console.log(req.body);
    console.log('received the widget request');
});

Source

Also in JavaScript: