得到一個數組我有一本字典象下面這樣:無法從的NSMutableDictionary
{
76 = (
{
language = en;
optionid = 1;
response = ffgh;
}
);
74 = (
{
language = en;
optionid = 1;
response = "Herbert S.B. Baraf, MD";
}
);
75 = (
{
language = en;
optionid = 1;
response = ffgh;
}
);
73 = (
{
language = en;
optionid = 1;
response = Excellent;
}
);
}
我沒有從我的字典使用下面的代碼拿到鑰匙值數組:
NSMutableArray *Array=[m_MutDictAnswers objectForKey:m_strRuleQuestion ];
儘管日誌數組是空和m_strRuleQuestion
是73
。我不知道爲什麼我得到一個空數組。 在我的json字符串m_strRuleQuestion
是「73」,但是當我編輯json到m_strRuleQuestion
到73時,我得到了正確的數組。我需要解決這個問題,編輯json字符串。誰能幫我。
這種事情是更容易在調試器斷點找出... PO [dict objectForKey @「72」] – 2013-04-26 12:14:54
[dict objectForKey @「72」]也返回空數組 – krishna 2013-04-26 12:16:17
然後嘗試@ 73,[dict allKeys] ...在調試器中,您不必重新編譯,你可以找出什麼真的在進行 – 2013-04-26 12:18:26