Using Node. This is weird, I am not able to attach a key/value....broadcastStamp = date
to the object result. I verified with typeof it is a object. There is no error...the key/value is just simply not there.
function broadcastSingleClient(result, event, httpObject) { var date = new Date().valueOf(); result.broadcastStamp = date; console.log(result);
UPDATE: This object is coming from a mongoose/mongodb query call back function:
Object.keys(models).forEach(function (model) { models[model].find({}).sort({_id: -1}).limit(1).exec( function (err, result){ broadcastSingleClient(result[0], model+"Result", res); });
When doing this query in the shell without the exec() call back, I am able to attach to the object.