node.js - How to get updated data in PUT request of express in the callback function of update method? -


my code:

router.put("/",function(req,res){     var collection = db.get("details");     collection.update({id: parseint(req.body.id)},                       {id: parseint(req.body.id), data: req.body.data},                       function(err, details){                           if(err) throw err;                           res.json(details);                       }) }); 

in above code, details in callback function of collectoon.update sending object of 'ok' status.

how updated data object.

thanks.


Comments