It seems I can\'t do a multiple insert in Meteor the same way it is described here in the Mongodb documentation...
In my js console :
> Test.insert([{na
You should always use bulk insert for these things. Meteor doesn't support this out of the box. You could use the batch insert plugin or access the node Mongodb driver to do it natively:
var items = [{name:'hello'},{name:'hello again'}],
testCollection = new Mongo.Collection("Test"),
bulk = testCollection.rawCollection().initializeUnorderedBulkOp();
for (var i = 0, len = items.length; i < len; i++) {
bulk.insert( items[i] );
}
bulk.execute();
Note that this only works on mongoDB 2.6+