How to print mongoose find() array docs in console
<p>I'm new to mongoose and trying to use <code>mongodb</code> with <code>node.js</code> using <code>Mongoose ODM</code>. </p>

<p>I've written some sample code which is given below:</p>

<p><strong>Sample Code -</strong></p>

<pre><code>/*!
 * mongoose.js
 * 
 * Getting Started
 */ 

var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var db = mongoose.connect('mongodb://localhost/trymongo').connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
  console.log("Connected to database");  // we're connected!

  // create schemas
  var SubjectSchema = new Schema({
    name: {
        type: String,
        required: true
    },
    teacher: {
        type: String
    }
  },
  {
    collection: 'subjects'
  });

  // create a model
  var Subject = mongoose.model('Subject', SubjectSchema);

  var arr = [{ name: 'Computer Programming', teacher: 'M. Swaminathan' }, { name: 'History' }];
  Subject.insertMany(arr, function(err) {
    if (err) throw err;

    console.log('Multiple subjects created!');

    // get all the subjects
    Subject.find({}, function(err, subjects) {
        if (err) throw err;

        console.log(subjects);
    });
  });
});
</code></pre>

<p>I want to print subjects in console using <code>console.log()</code> returned by mongoose model but it only prints like this - </p>

<pre><code>[ [object Object], [object Object] ]
</code></pre>

<p>I've also tried with <code>console.dir()</code> but result is same as above.</p>