标准的js对象访问过程,以newPeople为例,访问phone:varphone=newPeople.friend[0].phone;赋值类似。这种数组类型的内置文档,mongodb中有专门操作的API,可以操作数组的元素。