我有以下从 RestService 获得的 JSON 结构:
{
"customer": {
"id": "123456",
[more attributes ....]
"items": [
{
"id": "1234",
},
{
"id": "2345",
}
[more items...]
]
}
}
我使用 RestKit 成功映射到核心数据。然后,我从另一个 RestService (我无法更改)获取有关 items 数组中单个项目的更多详细信息。JSON答案看起来像
{
"customer": {
"id: "123456",
"item": {
"id": "1234",
"name": "foo",
[other attributes...]
}
}
}
现在的问题是:我如何映射第二个答案,以便将单个项目添加到 items 数组中(或者如果它已经存在则更新)?
感谢您的任何想法!