Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

mongodb filter multiple nested properties

const results = await Model.aggregate([
  {
    $match: {
      id: {
      	$in: ['someid']
      },
      'foo.bar': true,
      'foo.baz': true
    }
  }
]).exec()
 
PREVIOUS NEXT
Tagged: #mongodb #filter #multiple #nested #properties
ADD COMMENT
Topic
Name
3+7 =