2010-09-10 58 views
-1

我有一个NSDictionary的是,当印刷看起来像这样的NSDictionary解析HOWTO

(
     { 
     "current_game" = 1; 
     "fb_id" = 1; 
     "game_status" = 1; 
    }, 
     { 
     "current_game" = 4; 
     "fb_id" = 2; 
     "game_status" = 1; 
    }, 
     { 
     "current_game" = ""; 
     "fb_id" = 3; 
     "game_status" = ""; 
    }, 
     { 
     "current_game" = ""; 
     "fb_id" = 4; 
     "game_status" = "";\ 
    } 
) 

当我环像

for (int i=0; i < [responseDict count]; i++) { 
} 

我怎样才能访问fb_id = 1例如?
objectAtIndex:我似乎不存在,也没有钥匙。

感谢,
三通

+0

请格式化你的代码,这很容易。 – miku 2010-09-10 23:39:41

+0

修复了这个问题。用473代表,你应该知道如何格式化你的帖子。 – EboMike 2010-09-10 23:42:52

+1

这看起来更像是一组字典。 – 2010-09-11 00:20:49

回答

0

啊我想出如何做到这一点。

所以对于循环使用这个代替

for (iNSDictionary *status in responseDict) { 
} 

这样,那么你可以使用[状态objectForKey:@ “fb_id”]访问。

感谢,
三通