I had searched for complete googling. but found no answer for it.
I have the problem in parsing the array of objects from the json result .
I have json result like this:
[{“created_at”:”Sat Apr 28 13:36:24 +0000 2012″,
“text”:”@LisaPrejean Love your work! Very well done!”,
“source”:”web”,”user”:{“id”:478983313,”name”:”3rd Dimension Media”,
“created_at”:”Mon Jan 30 21:51:20 +0000 2012″,”favourites_count”:0},
“retweet_count”:0}]
& from result i want etract only “created_at” & “text”
(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
NSLog(@”%@”, jsonString);
self.jsonData = nil;NSArray *tweetArray = [jsonString JSONValue]; tweetTextArray = [NSMutableArray array]; for (NSDictionary *tweet in tweetArray){
[tweetTextArray addObject:[tweet objectForKey:@”text”]];
[tweetCreated_atArray addObject:[tweet objectForKey:@”created_at”]];
}
}
but getting EXC_bad_access error on line:
NSArray *tweetArray = [jsonString JSONValue];
Try this