collection.insert
Inserts a single document or a an array of documents into MongoDB.
Arguments
docs
(Object|Array)[
options
] (Object)
Use castIds: false
to disable autocasting of '_id' properties to ObjectIds objects.
- [
callback
] (function)
Returns
A promise.
Example
users.insert({ woot: 'foo' })
users.insert([{ woot: 'bar' }, { woot: 'baz' }])