I am creating an app for as existing website. They currently has the JSON in the following format :
[
{
\"id\": \"value\",
\"array\": \"[{\
May be this will help you.
- (void)jsonMethod
{
NSMutableArray *idArray = [[NSMutableArray alloc]init];
NSMutableArray *nameArray = [[NSMutableArray alloc]init];
NSMutableArray* descriptionArray = [[NSMutableArray alloc]init];
NSHTTPURLResponse *response = nil;
NSString *jsonUrlString = [NSString stringWithFormat:@"Enter your URL"];
NSURL *url = [NSURL URLWithString:[jsonUrlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURLRequest *request = [[NSURLRequest alloc]initWithURL:url];
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];
NSDictionary *result = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:nil];
NSLog(@"Result = %@",result);
for (NSDictionary *dic in [result valueForKey:@"date"])
{
[idArray addObject:[dic valueForKey:@"key"]];
[nameArray addObject:[dic valueForKey:@"key"]];
[descriptionArray addObject:[dic valueForKey:@"key"]];
}
}