我目前有一个如下所示的 JSON API:
{
  "posts": [
    {
      "id": 277,
      "title": "test title",
      "content": "test content",
      "attachments": [
        {
          "url": "http:\/\/www.example.com\/bar-icon-help@2x.png"
        }
    }
}    
我正在尝试使用“附件”下的“url”。请看看我做错了什么:
-(void)dataRequestCompletedWithJsonObject.(id)jsonObject
{
    NSDictionary *recipeDictionary = (NSDictionary*)jsonObject;
    NSArray* recipeArray = (NSArray*)[recipeDictionary objectForKey:@"posts"];
    self.recipes = [[NSMutableArray alloc] init];
    for (NSDictionary* dic in recipeArray) {
        Recipe *recipe = [[Recipe alloc] init];
        recipe.name = [dic objectForKey:@"title"];
        recipe.thumbNail = [[dic objectForKey:@"attachements"]objectForKey:@"url"];
        recipe.twitterShareCount = [[dic objectForKey:@"id"] intValue];
        [recipes addObject:recipe];
    }
主要是想弄清楚我应该使用什么来代替这一行:
recipe.thumbNail = [[dic objectForKey:@"attachements"]objectForKey:@"url"];
感谢任何帮助的人!