'Mongoose object array update

How do I update the value of an object in an array, I am trying to set the fields which u get from request body not all the fields, it's supposed to be a true of false value, an array of object which has 15 items in the object but I want to change the fields that match what were sent in by the request body and set to true



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source