我是 mongodb 的新手。我想为 ID 为“6007fccc89587095870958”的个人更新/添加角色为“父亲”的父母的 ID
{
_id : ObjectID("6007fccc89587095870958"),
name: 'John Smith',
gender: 'male',
birth: {
date: '12/07/2003'
place: 'NY'
parents: [
{
id: '',
role: 'father'
},
{
id: '',
role: 'mother'
}
]
}
}
最好的方法是什么?