Upvote:2

Aprove answer
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{ 
    NSArray *json = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:nil];    

    NSDictionary *trends = [json objectAtIndex:0];
    for (NSDictionary *trend in [trends objectForKey:@"trends"])
    {
        [viewController.names addObject:[trend objectForKey:@"name"]];
        [viewController.urls addObject:[trend objectForKey:@"url"]];
    }    

    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    [viewController.serviceView reloadData];
}

Credit Goes to: stackoverflow.com

Related question with same questions but different answers