Mongodb – Mongoose Model.updateMany not replacing an array
I'm having difficulty replacing a field with mongoose/mongodb I have some documents that look like this: {account:1234, myArray:[a,b,c]} const newArray = [d,e,f]; const result = await Model.updateMany({ account:1234, }, { $set:{ // 'testUpdating':4, 'myArray':newArray, } }); I get this back…