title: Can't change result from MongoDB/MongooseJS in route before sending it to the view (Node js)
body: <p>In my route I am trying to replace a value in whatever i get from the database before sending it to my view. </p>
  
  <p>In this case I am trying to replace a reference to a user, with the users username instead. But my console.log's just keep returning the value unchanged.</p>
  
  <pre><code>app.get('/message/inbox', function(req, res) {
      var _id = req.user._id;
      var inbox = null;
      var users = null;
      async.parallel([
          function(callback){
              Inbox.find({to: _id}, callback);
          },
          function(callback){
              User.find({}, callback);
          }
      ],
      function(err, result){
          inbox = result[0];
          users = result[1];
          for(var i = 0; i &lt; inbox.length; i++) {
              for(var j = 0; j &lt; users.length; j++) {
                  if(String(inbox[i].from) == String(users[j]._id)) {
                      inbox[i].from = users[j].local.username;
                      console.log(users[j].local.username);
                      console.log(inbox[i].from);
                      break;
                  }
              } 
          }
          console.log(inbox);
      });
  });
  </code></pre>
  
  <p>This is what my console returns:</p>
  
  <pre><code>some@email.com
  540468daeb56d5081ade600d
  [ { _id: 54084cacf212815422aabe94,
      from: 540468daeb56d5081ade600d,
      to: 5406bf4c8a8acc88120922dc,
      headline: 'Some Headline',
  text: 'Some text',
  __v: 0 } ]
  </code></pre>