How Search in Array Field works? (Lab 2.1)

  • Question from - How many documents in video.movieDetails match the filter {genres: “Comedy”}?
  • Question - Usually we search in Arraay in Json using indexOf(), but in Bson how it works? It is considering all arracy values, as observed in Lab 2.1 result. So, it is same as indexOf()?