Hi, I have a plist file with Root's type is Array, 20 items with type is Dictionary, each item have 3 keys (Name, Position, Number) and thier type is String. I want to get a key Position where's value is "Mid". I just can get all of thier Values not which value i want.
This is my code till now.
Please help, thanks.
This is my code till now.
Code:
//get URL from plist file.
NSString* path = [[NSBundlemainBundle]pathForResource: @"playersList"ofType: @"plist"];
//Save plist file to an NSMutableArray
self.playerOfList = [[NSMutableArrayalloc]initWithContentsOfFile: path];
Code:
NSDictionary* playerShow = [[self.playerOfList objectAtIndex:indexPath.row]objectForKey: @"Position"];
NSLog(@"%@", playerShow);
Please help, thanks.
Last edited by a moderator: