2023-10-24

MongoDB - Update a field using the value of another field

db.COLLECTION_NAME.updateMany(

{},

[{$set: {

"target_field": "$source_field"

}}]

);

No comments:

Post a Comment