I have document like below
{
_id="12345",
details:[
{
name:"Customer_Name",
time:"request_time"
},
{
name:"Customer_Name",
time:"request_time"
},
{
name:"Customer_Name",
time:"request_time"
}, ....
]
}
I want to update "name" field in all the objects of "details" array.
I can use it update each array object using
db.customer.updateMany({_id:"12345"},{$set:{"details.0.name":"My_Name"}});
Is there any way to update all of them at once