The best way would be to set the key for NSDictionary, which will be either lowercase or uppercase,
For example, let's say I have an NSArray string. I could get keyName before using it and convert it using lowercaseString or uppercaseString
NSString *itemName = @"lastName"; itemName = [itemName lowercaseString];
this will change the string to lastname, or if I use uppercaseString it will be LASTNAME
or you can also change the key name when adding to the dictionary as follows:
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; [dict setObject:objectToAdd forKey:[key uppercaseString]];
source share