我正在获得这样的JSON:
{
response = {
message = (
"Permission denied, you do not have permission to access the requested page."
);
};
}
我想打印:
“权限被拒绝,您无权访问所请求的页面。”
我如何获得价值?
答案 0 :(得分:0)
目标C
NSArray *arrRes = [[jsonRes objectForKey:@"response"] objectForkey:@"message"];
NSLog(@"The output result is - %@",arrRes);
然后,如果你想从数组中打印字符串,请执行以下操作
for(int i=0;i<arrRes.count;i++){
NSString *strRes = arrRes[i];
NSLog(@"The strRes is - %@",strRes);
}