Maybe I don't understand javascript/coffee script as well as I thought but when I do this:
that.thing = thing
that.thing.title = "some title"
console.log(that.thing.title)
console.log(JSON.stringify(that.thing)
I get output:
some title
{"creation_date":"2011-09-09T00:40:03.742Z","_id":"4e6960638ec80519a0000013"}
The problem is I seem to lose the title property when I do the stringify (and later on when the function exists I seem to be having other interesting problems which I assume have to do with 'that' and this nested within multiple fxn calls).
(I had to do an ugly solution for now where I do that.thing = {} to solve my problem. Other problems I had to solve before included node.js + async + mongoose.find and this is all inside async.findEach)
When I do
console.log(that.thing.toJSON)
I get:
function () { return this.toObject(); }
Thanks.
that.thingis not a horrific getter/setter thing?