title: mongodb inserting subdocuments as : [Object]
body: <p>i am inserting data into <code>mongodb</code> using <code>mongodb</code> driver in <code>nodejs</code>.</p>
  
  <pre><code>var mongodb = require('mongodb');
  
  var insert = function(uri, collectionName, data, next) {
      mongodb.MongoClient.connect(uri, function(err, driverDb) {  
        if(err) {
          next(err);
        } else {
          driverDb.collection(collectionName).insert(data,function(err,result) {
              if(err) {
                  next(err);
              } else {
                  driverDb.close(function (err) {
                      if(err) {
                          next(err);
                      } else {
                          next(null,result);
                      }
                  });
              }
          });
        }
      });
  };
  
  
  insert('mongodb://localhost/mean-test','testcol',{ 
               a : 'Apple',
               b : [ { ba: 'Boy' }, {bb : 'Bird'} ]
          }, function(err,models) {
              console.log(models);
          });
  </code></pre>
  
  <p>The above result into following:</p>
  
  <pre><code>[{a:'Apple', b : [[Object]] }]  
  </code></pre>
  
  <p>How do i achieve this :</p>
  
  <pre><code>[{_id:ObjectId("someid"), a:'Apple', b : [{_id:ObjectId("someid"), ba: 'Boy' }, {_id:ObjectId("someid"), bb : 'Bird'}] }]
  </code></pre>
  
  <p>Please note i do not want to use any other npm module except of <code>mongodb</code>.
  also i want to insert in one db query.</p>