mongoose update multiple documents code example
Example 1: mongoose find multiple and update
Model.updateMany({}, {})
Example 2: mongoose update array push multiple
Kitten.update(
{ name: 'fluffy'},
{
$push: {
values: {
$each: [2, 3]
}
}
}
)
.then(result => {
console.log(result)
})
.catch(err => {
console.error(err)
})