title: SocketIO/Mongoose JS .push to array issue
body: <p>This is using NodeJS, SocketIO, &amp; Mongoose.</p>
  
  <p>Client side button is firing server side 'LoadF' socket which is supposed to make 3 queries through mongoose and send back the results in the socket callback. I'm trying to push each of the Mongoose query results to an array that will be sent back as a single stringified JSON. </p>
  
  <p>The problem is that .push isn't filling the 'doc' array. I think it might be a scope issue but I have tried every imaginable combo I can think of with no results.</p>
  
  <p>Code (displaying just 1 of the 3 mongoose queries needed):</p>
  
  <pre><code>socket.on('loadF', function(data,callback){
          var doc = [];
          console.log("before:" + toString(doc));
          filldoc(function(err, assets){
              if (err) return console.error(err);
              console.log("during:" + assets);
              doc.push(JSON.stringify(assets));
          });
          callback(doc.join(','));
          console.log("after:" + doc[0]);
          function filldoc(callback){
              initCm.find({}, function(err, assets){
                  if (err) return callback(err, null);
                  callback(null, assets[0]);
              });
          }
      });
  </code></pre>
  
  <p>This is the output I'm getting from the log with no errors:</p>
  
  <pre><code>before:[object Undefined]
  after:undefined
  during:{ _id: 54e4c934b61b8b6824ff38aa,
    id: 'document',
    version: '1.0',
    __v: 0 }
  </code></pre>
  
  <p>The 'during' output is displaying what should be put into the array. </p>
  
  <p>Not sure why 'during' is coming after 'after' though? No matter what I try that always seems to be the case.</p>