Ios – How to get key/value pair from NSDictionary

iosiphonejsonnsdictionaryobjective c

I need little help with NSDictionary. How can I get 1 pair, lets say a value for "id" if I have dictionary

NSDictionary *allCourses = [NSJSONSerialization JSONObjectWithData:allCoursesData options:NSJSONReadingMutableContainers error:&error];

and it looks like this:

NSDictionary allCourses

Thanks for Your help.

Best Answer

The shortest way:

NSNumber *number = allCourses[@"semacko"][@"id"];