“list={{q="gggggg",a="rrrrrrrr"},{q="gggggg",a="rrrrrrrr"},{q="gggggg",a="rrrrrrrr"}}”有這種樣式的一組數據,我放在data中,怎麼樣才能取出,每個q,a相對應的值!請各位大神幫忙,在線等!
先解析出list這個字典;然後遍歷這個字典 當然得看你最外層是數組還字典,我默認你是字典
NSDictionary *listDic = [dic objectForKey:@"list"];
for (NSDictionary dic1 in listDic) {
NSString *q = [dic1 objectForKey:@"q"];
NSString *a = [dic1 objectForKey:@"a"];
}