¡@

Home 

2014/10/15 ¤U¤È 10:12:56

iphone Programming Glossary: processparsedobject

Recursively traverse NSDictionary of unknown structure

http://stackoverflow.com/questions/9186170/recursively-traverse-nsdictionary-of-unknown-structure

I already got past that line with a top level dictionary where the array of sub level dictionaries were found . void processParsedObject id dict counter int i parent NSString parent for id key in dict id value dict valueForKey key NSLog @ i @ @ @ i value class.. @ i value class parent key if value isKindOfClass NSDictionary class i NSDictionary newDict NSDictionary value self processParsedObject newDict counter i parent NSString key i else if value isKindOfClass NSArray class for id obj in value NSLog @ Obj Type.. traverse a JSON structured object coming from a web service and convert each element into a mutable version. void processParsedObject id object self processParsedObject object depth 0 parent nil void processParsedObject id object depth int depth parent id..