mongoose array is have code example
Example: mongoose array includes
// As favouriteFoods is a simple array of strings,
// you can just query that field directly:
// favouriteFoods contains "sushi"
PersonModel.find({ favouriteFoods: "sushi" }, ...);