I have a dictionary according to the image below and I would like to play the names of the dictionary keys medicaments for an array, how I can accomplish this function
I have a dictionary according to the image below and I would like to play the names of the dictionary keys medicaments for an array, how I can accomplish this function
NSDictionary has method - (NSArray *)allKeys
that returns an array containing all the keys of the dictionary
NSString * path= [[NSBundle mainBundle]pathForResource:@"Medicamentos" ofType:@"plist"];
NSDictionary * dadosArquivo =[NSDictionary dictionaryWithContentsOfFile:path];
NSArray * medicamentos =[dadosArquivo objectForKey:@"medicamentos"]; //
NSLog(@"%@", medicamentos);
I think that's it.