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
Actually the ID should already be there when instantiating the object
var n = new Chat(); console.log(n._id) // => 4e7819d26f29f407b0... -> ID is already allocated
Check this answer here: https://stackoverflow.com/a/7480248/318380