In express 4 and above you don't need body parser they have their own json parse method,At the higehset level of your express app add
var express = require('express');var app = express()app.use(express.json()); //declare this to receive json objects.
Other answers failed to mention, when making the request to express via fetch or other clients. The request must be formatted a certain way.
const response = await fetch(`${expressAddress}/controller/route`, { method: 'POST', // *GET, POST, PUT, DELETE, etc. headers: {'Content-Type': 'application/json' //this must be set to a json type }, body: JSON.stringify(row) //regular js object need to be converted to json })
If you make the fetch request like this the req.body will output your json object as expected.