Guest User

Untitled

a guest
Oct 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. -(void)recurse:(NSDictionary *)dict counter: (int*) i parent:(NSString *) parent{
  2. for (NSString* key in [dict allKeys]) {
  3. id value = [dict objectForKey:key];
  4. NSLog(@"%@ -> %@", parent, key);
  5. if ([value isKindOfClass:[NSMutableDictionary class]]) {
  6. i++;
  7. NSDictionary* newDict = (NSDictionary*)value;
  8. [self recurse:newDict counter:i parent:key];
  9. i--;
  10. } else {
  11. //Do smthg
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment