Arrays 如何存储我的表单';通过环回在MongoDb中存储数据?
以下是我要存储数据的格式:-Arrays 如何存储我的表单';通过环回在MongoDb中存储数据?,arrays,mongodb,loopbackjs,Arrays,Mongodb,Loopbackjs,以下是我要存储数据的格式:- { "profilePicture": "string", "firstName": "string", "lastName": "string", "birthDate": "2017-07-13T10:41:30.618Z", "anniversary": "2017-07-13T10:41:30.618Z", "contact": [ "string" ], "email": [ "string" ],
{
"profilePicture": "string",
"firstName": "string",
"lastName": "string",
"birthDate": "2017-07-13T10:41:30.618Z",
"anniversary": "2017-07-13T10:41:30.618Z",
"contact": [
"string"
],
"email": [
"string"
],
"webSite": [
"string"
],
"address": [
"string"
],
"location": {},
"id": "string"
}
对于我的控制器,我给出了模型的格式如下:-
profile = { "location": {
"type": "Point",
"coordinates": [
76,
23
]
},
"webSite":[],
"contact":[],
"email":[],
"address":[]
};
那么我如何使用post方法以上述格式存储数据呢