.createCollection()
Creates a new collection where data will be stored in a separate file.
createCollection(name, defaultValues)
const Users = db.createCollection('users');const People = db.createCollection('people', {
name: 'Unnamed person',
hobbies: []
});Last updated