以下是我要存储数据的格式: -
{
"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方法以上述格式存储数据呢?