title: Printing value of mongoose result on console in express node.js
body: <p>I am getting value from mongoose through query </p>
  
  <pre><code>          console.log(docs);
  output :  [ { usercount: 0, _id: 5653fab1d6b5f1cf624b97fd },
           { usercount: 1, _id: 56541b49d6b5f1cf624b97ff } ]
  
         console.log(docs[1]._id);
  output:   56541b49d6b5f1cf624b97ff
  
        console.log(docs[1].usercount);
  output: undefined
  </code></pre>
  
  <p>So, How i will get the value of usercount.</p>
  
  <p>I have model uservisitcount.js with following code:</p>
  
  <pre><code>var mongoose = require('mongoose')
    ,Schema = mongoose.Schema
    uservisitcountSchema = new Schema( {
        usercount:String,
    }),
  Usercount = mongoose.model('uservisitcount', uservisitcountSchema);
  
  module.exports = Usercount;
  </code></pre>
  
  <p>Included this model in controller with: </p>
  
  <pre><code>var Uservisitcount = require('../models/uservisitcount');
  </code></pre>
  
  <p>And i ran following query:</p>
  
  <pre><code>Uservisitcount.find({},function(err,docs){
         console.log(docs);
         console.log(docs[1]._id);
         console.log(docs[1].usercount);
     }
  </code></pre>