Reputation: 2418
Does anybody know how to access all index's and not just a specific for a certain key
ie[[anArray objectAtIndex:indexPath.row]objectForKey:@"Number"]
i want [[anArray objectAtIndex:ALL ROWS]objectForKey:@"Number"]
Thanks :)
Upvotes: 0
Views: 55
Reputation: 170859
You can use -valueForKey: method of NSArray:
NSArray* numbersArray = [anArray valueForKey:@"Number"];
This method returns an array containing results of -valueForKey: called on each element of array (putting NSNull object in case that result is nil).
Upvotes: 2