Does a toString type function exists for mongodb object. For example I have a mongo object and I access it using mongoose in node.js.
x = new Type();
I want to call something like
console.log(x);
Which displays a specific field defined in toString of x. This isn't equivalent to object._id.toString() because x is not stored in the database.