1
我收到的JSON响应作为阅读整数值
apiResponse =
{ Appointment = 4;
Goals = 0;
Holiday = 0;
LessonPlan = 0;
ServiceLevel = 0;
SiteSetup = 0;
Student = 2;
TherapyLog = 0;
Worksite = 0;
};
我用来得到值作为 NSMutableDictionary* resultTables=[result objectForKey:@"apiResponse"];
int countVals=[[result objectForKey:tablename] intValue] ;
当我检查
if (countVals>=0)
{
NSLog(@"Tables Names:%@",tablename);
[updatedTables addObject:tablename];
}else
{
NSLog(@"Tables Names:%@",tablename);
NSLog(@"no data to update");
}
表名不会添加到updateTables ARRAY。 什么是我的错......
你初始化了更新表吗? – rdelmar
我得到了解决方案。我使用了错误的字典 – sudheer
这是什么表名? –