Anywhere
collection.insert(doc, [callback])
Insert a document in the collection. Returns its unique _id.
Arguments
- doc Object
-
The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.
- callback Function
-
Optional. If present, called with an error object as the first argument and, if no error, the _id as the second.
Please login to continue.