Error: the update operation document must contain atomic operators?theRealJSLast updated on December 14Your thoughts? Share your thoughts Dwight The Developer | December 13, 2021This happens when you call findOneAndUpdate but don't pass the update param correctly...db.getCollection('users').findOneAndUpdate({_id:ObjectId("619931751813962bcf3eb1bf")}, {displayName:"influencer"}, {new:true}) should be...db.getCollection('users').findOneAndUpdate({_id:ObjectId("619931751813962bcf3eb1bf")}, {$set:{displayName:"influencer"}}, {new:true}) Notice if $set is not used in the update argument then you will get this error!0
This happens when you call findOneAndUpdate but don't pass the update param correctly...
should be...
Notice if $set is not used in the update argument then you will get this error!