I was just about to ask, but I figured out the answer on my own.
Suppose I have an NSDictionary, and some of its values are NSDictionaries themselves, and some of their values are NSDictionaries. If I want to loop through all of the dictionaries, I can simply create a category on NSDictionary that includes a method that is written like this:
Suppose I have an NSDictionary, and some of its values are NSDictionaries themselves, and some of their values are NSDictionaries. If I want to loop through all of the dictionaries, I can simply create a category on NSDictionary that includes a method that is written like this:
Code:
-(void)doSomething
{
// some code here
for (NSDictionary *dictionary in [self allValues])
{
[dictionary doSomething];
}
}