结合2个字典数组

时间:2014-09-30 06:35:56

标签: objective-c nsarray nsdictionary

Array1{ ( Name:david; Place:UK; Work:Google; url:"www.google.com"; id=1;,

Name:John; Place:UK; Work:Yahoo; url:"www.yahoo.com"; id=2;,

Name:david; Place:US; Work:stack; url:"www.facebook.com"; id=3; )}

Array2{ ( Name:david; D.O.B:26.4.2012; url:"www.google.com";

)}

有2个词典数组(Array1Array2)。我想检查这两个数组是否有共同的名字(例如:David)。但由于在Array1中有2个同名的人,我想给出第二个条件,也可以比较两个数组。如果满足条件,则应将它们组合成1个数组,如下所示(D.o.B仅添加到数组1中的第1个david)

Combined Array{ ( Name:david; Place:UK; Work:Google; url:"www.google.com"; D.O.B:26.4.2012; id=1;,

Name:John; Place:UK; Work:Yahoo; url:"www.yahoo.com"; id=2;,

Name:david; Place:US; Work:stack; url:"www.facebook.com"; id=3;, )}

0 个答案:

没有答案