I have a NSArray of NSDictionaries. Each NSDictionary contains a key with value as a NSArray of NSString (see below). I do not want to loop through and do the traditional comparison. So I though of using valueForKeyPath but is returns me arrays of data back and not single array of all strings.
Expected output is Key3 = (Data1, Data2, Data3, Data4);
Any idea.
[myArray valueForKeyPath:@"@unionOfObjects.Key3"];
<__NSCFArray 0xe70c10>(
{
Key1 = 1;
Key2 = "New Location";
Key3 = (
Data1,
Data2,
Data3
);
},
{
Key1 = 2;
Key2 = "Old Location";
Key3 = (
Data1,
Data2,
Data4
);
}
)