JSONkit.h
の使用に問題がありNSDictionary
ます。それを適切に使用する方法は何ですか?
Json:
[{"id":"1100","name":"John Stuart"}]
コード:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSDictionary *jsonData = [responseData objectFromJSONData];
NSString *name = [jsonData objectForKey:@"name"];
NSLog(@"Name: %@", name);
}
エラー:
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[JKArray objectForKey:]: unrecognized selector sent to instance 0x84b9b30'