$or operator in mongoose is used to perform a logical OR operation on an array of expressions. It helps you in situations when you need to find documents with multiple conditions. Such as creating a search with multiple parameters. It accepts an array of expressions and returns all the documents…
Category: MongoDB
In situations where you need to get documents excluding some specific values, as a beginner, you will extract all documents and use javascript to filter. But that’s not the ideal way to do this. MongoDB gifted us with a really powerful operator that can help us make a mongo query…
Population or Query Population in mongoose is a process of automatically replacing paths with other documents from other collections in a single document, multiple documents, objects, multiple objects. That’s the official definition of the population by a mongoose. But, most of us would understand this one: “Population is simply a…