Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beautify NSLog of NSArray & NSDictionary

I'm dealing with deeply nested NSArray's and NSDictionary's and it's very time consuming to say the least. [data objectatindex:0] valueForKey:@"blah"] etc etc

Does anyone know of a nice iOS category to recursively log the structure, highlight the type and show the values?

Might be asking a bit much but you never know :)

like image 861
iOSDevil Avatar asked Aug 19 '11 11:08

iOSDevil


1 Answers

Hmm. Simple

NSLog( @"%@", dictionaryYouWantToPrint ); 

outputs following result for me:

{     id = 1;     matchCount = 0;     matchPattern = abcdef;     number = "123456";     sessionID = 5;     status = Unknown;     timerStart = 1367229348; } 
like image 125
Andrey Starodubtsev Avatar answered Oct 16 '22 04:10

Andrey Starodubtsev