title: Inserting multiple documents into mongodb using one call in Meteor
body: <p>In the mongo shell, it is possible to <a href="https://docs.mongodb.org/manual/tutorial/insert-documents/#insert-an-array-of-documents" rel="nofollow noreferrer">insert an array of documents with one call</a>. In a Meteor project, I have tried using</p>
  
  <pre><code>MyCollection = new Mongo.Collection("my_collection")
  documentArray = [{"one": 1}, {"two": 2}]
  MyCollection.insert(documentArray)
  </code></pre>
  
  <p>However, when I check my_collection from the mongo shell, it shows that only one document has been inserted, and that document contains the entire array as if it had been a map:</p>
  
  <pre><code>db.my_collection.find({})
  { "_id" : "KPsbjZt5ALZam4MTd", "0" : { "one" : 1 }, "1" : { "two" : 2} }
  </code></pre>
  
  <p>Is there a Meteor call that I can use to add a series of documents all at once, or must use a technique such as the one described <a href="https://stackoverflow.com/questions/19092630/node-js-mongodb-inserting-updating-multiple-documents-and-sending-a-single-re">here</a>?</p>
  
  <p>I imagine that inserting multiple documents in a single call would optimize performance on the client side, where the new documents would become available all at once.</p>