title: Mongoose returns Mongo object, but can't access property on it
body: <p>In my simple Node/Mongo/Mongoose setup, I have a function that calls the server to see what the highest ID I'm using currently is, and return the next ID. This function takes as a callback the functionality that creates a new <code>Game</code>.</p>
  
  <p>Weird: The <code>logger.log</code> as it appears below outputs </p>
  
  <pre><code>result { _id: 555d83d5bb0d4e3c352d896f, gameId: 'NaN' }
  </code></pre>
  
  <p>but when I change the logger to</p>
  
  <pre><code>logger.log("result", result.gameId);
  </code></pre>
  
  <p>the output is</p>
  
  <pre><code>result { _id: 555d83d5bb0d4e3c352d896f, gameId: 'NaN' }
  </code></pre>
  
  <p>which makes no sense. Clearly that property is there!</p>
  
  <p>Here is my code</p>
  
  <pre><code>var createGame = function(gameNickname, callback){
      nextGameId(function(nextId){
  
          var newgame = new models.Game({
              "gameId": Number(nextId),
              "gameNickname": gameNickname
          });
          newgame.save(function(result, game){
              callback(result + nextId);
          });
      });
  
  
  };
  var nextGameId = function(callback){
      var games = models.Game.find({}, {gameId: 1});
      games.sort('-gameId').limit(1) //get the highest number roundId and add 1 to it
      .exec(function (err, result) {
          if (err) logger.log(err);
          if (result === null){
              callback(0);
          }
          else{
              logger.log("result", result);
              callback(result.gameId);
          }
      });
  };
  </code></pre>