Person.remove( age: $lt: 18 , function(err, result) console.log(`$result.deletedCount minors deleted.`); );
Once you've defined your Mongoose models, you can start interacting with them. Here are a few examples: mongodb and mongoose freecodecamp
Mongoose allows you to define a schema: