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);     }); }); 

delete req.body.name 

should work in javascript object

check how remove property javascript object?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -