ValidatingLab1 for $match aggregation

I dont for some reason my answer was wrong,

  var pipeline = [ { $match : { "imdb.rating" : { $gt : 7 } } },{ $match : { "geners" :  { $nin : 
                  ["Horror", "Crime"]  } } },
             { $match : {  $or : [ { "rated" : "PG" }, { "rated" : "G" } ] } },   
             { $match : { $and : [ {  "languages" :  "English"  }, { "languages": "Japanese"} ] } }
            ]

whats wrong with above pipeline its always returning 24 instead of 23,

Because you mistyped geners, its supposed to be genres.

By the way, you do not need to use $match for every single condition:

1 Like