我在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" : "ros.pad33alko@gmail.com",
"foreName" : "",
"surname" : "",
"name" : "",
"__v" : 0
}
我希望将图像存储在证书['image','image'...]中的字符串数组中,但是我需要特殊的顺序,它是否像JavaScript一样可以通过像
certificates{index] = 'something';
并且在mongogoDb中它存储像这样的证书:[0:'something',1:'something',x:'something'] 0,1,x索引数组证书谢谢。