I'm using Mongoose with NodeJS. When I create new instance of a Model (called Expression), it adds the object to the database and returns me an object of the newly created model.
However.. I am unable to delete a field from this json object.
var savedExpr = await Expression.create(expr);
delete savedExpr["__v"]
return savedExpr;
This code merely returns the original savedExpr with the __v field included. Any ideas?
Thank you.