javascript - To delete a variable from req.body in NodeJS ExpressJS -
i receive json lot of information want delete particular data, example, if receive variable name, want remove variable before adding json in database. function post:
app.post("/:coleccion", function (req, res, next) { post if(req.body.name) // here need delete "name" if receive variable <------ req.collection.insert(req.body, {}, function (e, result) { if(e) return next(e); res.send(result); }); });
Comments
Post a Comment