javascript - Why can't I delete a mongoose model's object properties? -


When a user is registered with my API, they return a user object. Before returning to the object, I remove the head password and salt properties. I have to use

  user.salt = undefined; User.pass = undefined;  

Because when I try

  delete user.salt; Delete User.pass;  Delete      To use "itemprop =" text "> 

you have to call the column in a simple JavaScript object so that you can easily You can manipulate:

  user = user.toObject (); Delete User.salt; Delete User.pass;  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -