this surely is a pretty basic question, but i've been struggling and still no answer.
I have an array of dictionaries, each NSdictionary has the same amount and type of key-value pairs, i want to store all the values(NSstring) of a given key (all dictionaries have that same key) but still no luck.
the last thing i come up with was:
int i=0;
while (i< dictArray.count) {
[newArray addObject:[dictArray[i] objectForKey:@"keyName"]];
NSLog(@"%@",[dictArray[i] objectForKey:@"keyName"]);
NSLog(@"%@",newArray);
i++;
}
In the NSlogs i put for debugging, i can see that [rows[i] objectForKey:@"keyName"] displays te correct NSstring value for "keyName", but the Newarray NSlog shows null, what am i doing wrong? is there a better way to get this valúes? thank you!
PD: newArray is a NSMutaleArray