我想用AFNetworking庫代碼如何解析JSON在Objective-C的iOS
{
"success": 1,
"row": [
{
"amount": 2800
}
]
}
iOS中解析JSON在Objective-C -響應
arrAmount = [responseObject valueForKey:@"row"];
NSLog(@"%@",arrAmount);
NSString *strAmount =[NSString stringWithFormat:@"%@", [arrAmount valueForKey:@"amount"]];
self.lblAmount.text =[NSString stringWithFormat:@"%@",strAmount];
這不會起作用,因爲關鍵'row'包含數組沒有字典。 –
@NiravD很高興有你的關注,但這將工作:)) – vaibhav
你能解釋一下嗎? –