【发布时间】:2019-11-18 11:12:53
【问题描述】:
我有一系列可以选择的问题
[
{
"id": 1,
"title": "test",
"info": "Test123",
"is_selected": true
},
{
"id": 2,
"title": "test2",
"info": "test2",
"is_selected": false
},
{
"id": 3,
"title": "test23",
"info": "test23",
"is_selected": true
}
]
我们如何将这个包含许多键的字典数组缩减为具有单个键的字典数组
[
{
"question_id": 1
},
{
"question_id": 2
}
]
【问题讨论】:
标签: ios arrays swift dictionary