title: Can't insert into Mongo collection
body: <p>Using:
  Ubuntu 17.04
  MongoDB 3.6</p>
  
  <p>I've just started learning MongoDB and have run into this problem when trying to insert into a document. I can connect to the database but not insert. Here's the code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var MongoClient = require('mongodb').MongoClient;
  var connectionUrl = 'MongoDB://localhost:27017/myproject',
  sampleCollection = 'chapters';
  
  var chapters = [{
  'Title': 'Snow Crash',
  'Author': 'Neal Stephenson'
  },{
  'Title': 'Snow Crash',
  'Author': 'Neal Stephenson'
  }];
  
  MongoClient.connect(connectionUrl, function(err, db) {
    console.log("Connected correctly to server");
    // Get some collection
    var collection = db.collection(sampleCollection);
    collection.insert(chapters,function(error,result){
      //here result will contain an array of records inserted
      if(!error) {
        console.log("Success :"+result.ops.length+" chapters inserted!");
      } else {
        console.log("Some error was encountered!");
      }
      db.close();
    });
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>What am I doing wrong? Thanks for any help offered :)</p>