0
我有这样的玛MongoDB中:如何在mongoDB中使用空数组?
"_id" : ObjectId("57a376dc317843700b7bd83f"),
"approved" : false,
"experience" : 0,
"placeOfWork" : "",
"education" : "",
"price" : 0,
"courses" : [],
"certificates" : [],
"createdAt" : ISODate("2016-08-04T17:09:48.773Z"),
"profileImg" : "images/profile.png",
"role" : "doctor",
"phone" : "",
"password" :'',
"email" : "[email protected]",
"foreName" : "",
"surname" : "",
"name" : "",
"__v" : 0
}
,我想存储在字符串数组图像证书[“形象”,“图像” ...]但我nee的特殊订单,是更多钞票像在JavaScript中由索引等
certificates{index] = 'something';
添加图片到阵列和mongogoDb它存储这样的证书:[0: '东西',1: '某物' 中,x: '某物'] 0,1中,x感谢阵列证书的索引。