Home > database >  Directing the update operation
Directing the update operation

Time:10-27

Ask you a great god
Directing how to update a field values for the fields of the array
For example,
{
.
Array: [1, 2, 3, 4],
.
}
I want to change the array in the Java to,6,7,8 [5]
Thank you for the

CodePudding user response:

Directly update line.
Db. Collection_name. Update ({_id: 1}, {$st: {array:,6,7,8 [5]}})

CodePudding user response:

According to the original form of the data can be updated directly,
  • Related