MongoDB CRUD for Documents/Insert many documents

Create multiple documents in one call.

Section: Create and read

Insert many documents

javascript
javascript
db.products.insertMany([{ sku: "A101", name: "Mouse", price: 19 }, { sku: "A102", name: "Monitor", price: 199 }])
Explanation

Useful for seed data and batch creation workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Create and read
Insert one document
Create a single document.
OpenIn sheetjavascriptsame section
Find one matching document
Return a single document by filter.
OpenIn sheetjavascriptsame section
Find documents with a filter
Return all matching documents.
OpenIn sheetjavascriptsame section
Count matching documents
Count documents for a specific filter.
OpenIn sheetjavascriptsame section
Replace one document
Swap the entire document body.
OpenIn sheetjavascript2 tag match
Delete one document
Remove the first matching document.
OpenIn sheetjavascript2 tag match