Replace all NSNull objects in an NSDictionary

I’ve made a few changes to Jacob’s original answer to extend it to handle dictionaries and arrays stored within the original dictionary. #import “NSDictionary+NullReplacement.h” #import “NSArray+NullReplacement.h” @implementation NSDictionary (NullReplacement) – (NSDictionary *)dictionaryByReplacingNullsWithBlanks { const NSMutableDictionary *replaced = [self mutableCopy]; const id nul = [NSNull null]; const NSString *blank = @””; for (NSString *key in self) … Read more