我有一个模型数据,例如:
{
"status": 7,
"organizations": [{
"org_address": "\u4e2d\u56fd\u5317\u4eac\u5e02\u671d\u9633\u95e8\u59161001\u53f7",
"job_positions": "\u603b\u7ecf\u7406",
"org_id": 11,
"org_name": "\u6570\u7ef4\u79d1\u6280"
}],
"first_name": null,
"last_name": null,
"create_date": "2013-07-02 23:47:14.239000",
"name": "\u5f20\u5174\u6807",
"extra_emails": [null],
"tags": [{
"oid": 4,
"id": 4,
"name": "friend"
}],
"nick_name": "\u9ec4\u98de\u9e3f",
"gender": "\u7537",
"image": null,
"created_by": "system",
"effective_start_date": "2013-07-02 23:47:14.239000",
"social_medias": [{
"url": "http://weibo.com/12345",
"sm_name": "\u6700\u70ab\u6c11\u65cf\u98ce",
"type": "\u65b0\u6d6a\u5fae\u535a",
"party_sm_id": 1
}],
"date_of_birth": "1980-04-01",
"extra_phones": {
"office_phone": "82323333",
"fax": "82324433"
},
"mobile_phone": "13909609306",
"primary_email": "zhangxb@xy.com",
"id": "10",
"isUser": false
}
现在我想修改数据并保存模型,假设我的模型名为“cmodel”。当我尝试保存数据时,我尝试了以下方法:
cmodel.save({
organizations[0].org_address:"road1",
organizations[0].org_name:"name1"
});
但是这不起作用,所以我想知道如何保存我编辑的数据。
希望得到您的帮助,谢谢。