title: Custom transform of Mongoose JSON into Javascript object
body: <p>I would like to specify a custom transform of the JSON received by Mongoose as part of a query into a Javascript object. Typically, <code>JSON.parse()</code> or something similar is used. I would like to use my own transform function because I would like to include a new field called <code>__length</code> which is the length of the JSON received over the network. I do not want to use <code>JSON.stringify(document_from_mongo).length()</code> because I am performing an unnecessary stringify operation.</p>
  
  <p>I have investigated using a custom toObject() or toJSON() method on the schema, but have not had any success. Thanks!</p>