IOS添加json文件的条目计数

大家好,我创建了一个json请求:

for (int i=0; i<= [urls count]-1; i++) {
    self.items=[[NSMutableDictionary alloc] init];
    [self.items setObject:[names objectAtIndex:i] forKey:@"results"];
    [self.items setObject:[urls objectAtIndex:i] forKey:@"URL"];
    [self.list addObject:_soccerList];
}

NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:_list
                                                   options:0
                                                     error:&error];

self.results=[NSJSONSerialization
                           JSONObjectWithData:jsonData
                           options:0
                           error:&error];

但是我需要添加这个标题到json请求中,其中添加条目计数。不知道如何实现?

{
"resultCount":50,
"results": [

/// json content 

]
}

for循环的adding _soccerList,在这行之前加下面的代码:

 NSDictionary *dic=[[NSDictionary alloc] initWithObjectsAndKeys:[self.items count],@"resultCount",nil];
 [self.list addObject:dic];
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"50", @"resultCount", _list1, @"results", nil];

NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict
                                                   options:0
                                                     error:&error];

解决~