【发布时间】:2018-01-09 06:45:28
【问题描述】:
全部,
在可变数组中我有多个数组,在每个数组中我有多个字典,在字典中我有共同的值,根据值我必须对下面的数组/字典进行分组是示例数组
(
(
{
name = "attribute_Subject";
value = English;
},
{
name = "attribute_class";
value = Fourth;
},
),
(
{
name = "attribute_Subject";
value = English;
},
{
name = "attribute_class";
value = Fifth;
},
),
(
{
name = "attribute_Subject";
value = Maths;
},
{
name = "attribute_class";
value = Fourth;
},
),
(
{
name = "attribute_Subject";
value = Science;
},
{
name = "attribute_class";
value = Fourth;
},
),
(
{
name = "attribute_Subject";
value = English;
},
{
name = "attribute_class";
value = Sixth;
},
),
(
{
name = "attribute_Subject";
value = Maths;
},
{
name = "attribute_class";
value = Sixth;
},
),
)
如果您看到我们在三个数组中有英语的数组,我希望这三个数组在一个单独的数组中,并且对于“科学”和数学也是如此
我们可以使用谓词吗?
谁能帮忙
【问题讨论】:
-
你能显示预期的结果吗?
标签: objective-c nsmutablearray nsarray