So I am just trying to replicate something that you can do using the mongodb driver (the first answer), Update MongoDB field using value of another field
db.collection.<update method>(
{},
[
{
"$set": {
"todayHours" : "$tomorrowHours",
"tomorrowHours" : "2"
}
}
]
)
The code I have on mongoose is
this.userModel.updateMany({},{
"todayHours" : "$tomorrowHours",
"tomorrowHours" : "2"
})
But it won't work as expected Any ideas?