var n = new Chat(); n.name = \"chat room\"; n.save(function(){ //console.log(THE OBJECT ID that I just saved); });
I want to console.log the ob
Mongo sends the complete document as a callbackobject so you can simply get it from there only.
for example
n.save(function(err,room){ var newRoomId = room._id; });