title: Node js / Mongoose .find()
body: <p>Im having trouble using the .find() function within mongoose on a node js server I've been trying to use this but I cannot get the key information out of my database.</p>
  
  <pre><code>user.find({key: 1} , function(err, data){
    if(err){
      console.log(err);
    };
    console.log("should be the key VVV");
    console.log(data.key);
  });
  </code></pre>
  
  <p>I'm mainly just having trouble wrapping my head around how this function takes queries and gives you back the response from your DB. If someone can break it down id be very thankful the mongoose docs weren't much help.</p>
  
  <p>Also this is my user schema if it helps</p>
  
  <pre><code>var userSchema = new mongoose.Schema({
    username: {type: String, unique: true},
    password: {type: String},
    key: {type: String},
    keySecret: {type: String}
  }, {collection: 'user'});
  
  
  var User = mongoose.model('user',userSchema);
  
  module.exports = User;
  </code></pre>