Answer by mscdex for Can't figure out correct way to use body-parser
You can use util.inspect() to get a string representation of the value, or use console.dir(req.body) which outputs util.inspect(req.body) to stdout.
View ArticleAnswer by javierfdezg for Can't figure out correct way to use body-parser
You are doing nothing wrong. The [Object object] you see is due to the console.log. Try this: console.log(req.body.user). My guess is that you'll see the correct output. Have a look to this question...
View ArticleCan't figure out correct way to use body-parser
I am writing the backend of a simple app using node and express. This is how I have structured my code:app.jsvar express = require("express");var bodyParser = require("body-parser");var app =...
View Article
More Pages to Explore .....