using spread syntax with Mongoose Document after calling the .save method results in undefined keys
using spread syntax with Mongoose Document after calling the .save method results in undefined keys mongoose
mongoose
This is because Mongoose uses getters for all of its attributes. Before you use the spread operator, call createdNpc.toObject() to get a normal Object.