NSMutableArray *arr; arr = [[NSMutableArray alloc]init];//全局 NSURL *url = [NSURL URLWithString:@"http://a.meidebi.com/Link-alllist-p-1-pagecount-10"];//获取网络资源 NSURLRequest *request = [NSURLRequest requestWithURL:url];//建立一个请求 NSURLResponse *response = nil; NSError *error = nil; //网络连接转换为数据类型 NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; //用NSJSONSerialization把JSON数据解析成UI类型 id jsonObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error]; NSDictionary *dic = (NSDictionary *)jsonObject; //NSLog(@"%@",dic); NSDictionary *dic1 = [dic valueForKey:@"data"]; NSDictionary *dic2 = [dic1 valueForKey:@"linklist"]; for (NSDictionary *dic3 in dic2) { [arr addObject:[dic3 objectForKey:@"title"]]; }