Get array of property value of each object in another array without a for loop

Yes. Assuming that your object is adopting the KVC/KVO protocol. You can get an array of the properties like:

NSArray *colorList = [carArray valueForKey:@"color"];

Actually, what valueForKey: method does, is to return an array containing the results of invoking valueForKey: using key on each of the array’s objects. (From Apple’s Documentation on NSArray)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)