I need to merge two NSDictionary
s into one provided that if there are dictionaries within the dictionaries, they are also merged.
More or less like jQuery's extend
function.
I need to merge two NSDictionary
s into one provided that if there are dictionaries within the dictionaries, they are also merged.
More or less like jQuery's extend
function.
I think this is what you're looking for:
First, you need to make a deep mutable copy, so you can create a category on
NSDictionary
to do this:Then, you can call
deepMutableCopy
like this: