Filters
Filter system, use to filter results
Property
Description
Type usage
$exists
is defined
Any
To use, just create an object, its key will be the value that we will apply the filters
<key>: { $filter: value }
Teacher.find({
age: {
$gte: 20
},
score: {
$gte: 5
}
})Output
Reference with filter
The filter can be applied inside finds with references
Full example
Last updated
Was this helpful?