title: How do you turn a Mongoose document into a plain object?
body: <p>I have a document from a mongoose find that I want to extend before JSON encoding and sending out as a response. If I try adding properties to the doc it is ignored. The properties don't appear in <code>Object.getOwnPropertyNames(doc)</code> making a normal extend not possible. The strange thing is that <code>JSON.parse(JSON.encode(doc))</code> works and returns an object with all of the correct properties. Is there a better way to do this?</p>