Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Case insensitive keys for NSDictionary

I am trying to utilize incase-sensitive case for JSON response on NSDictionary as sometimes my response keys type varies, some are camel case, some are lowercase or other mixed combination. Is there any built in functionality to check for in-sensitivity case for this case?

Thanks.

like image 403
topgun Avatar asked May 24 '12 00:05

topgun


1 Answers

Lately I've shared two classes that might suit your needs. They provide case-insensitive operations (named after NSDictionary and NSMutableDictionary methods) while keeping the originally inserted keys.

Give it a try:

https://github.com/keeshux/ios-components/tree/master/Components/Utils/KSCIDictionary

like image 71
keeshux Avatar answered Sep 18 '22 12:09

keeshux