mongoose-schema-serializer
serialize and deserialize your mongoose schema with this simple JSON stringifier/reviver
Useful, when you need to send your schema over the network-for example to your admin frontend.
Install
npm i mongoose-schema-serializer
Usage
var Schema = mongooseSchema //on the frontend you can provide an object with same structure to satisfy itconst mss = Schema// mss2 one will deserialize ObjectId and Mixed as strings.const mss2 = const json = mss// then on frontendconst schema = mss2