私はこのようなJSonオブジェクトを持っています
{{
Attendance = {
Attendance = (
{
EmployeeCode = 7593;
InDate = "27/02/2013";
InTime = "08:11";
InTime2 = "00:00";
OutDate = "27/02/2013";
OutDate2 = "01/01/1901";
OutTime = "17:42";
OutTime2 = "00:00";
Present = 1;
}
);
AttendanceCount = 1;
};
AuthPersons = {
WFAuthCount = 1;
WfAuthPersons = (
{
LsAuthls = (
{
AuthEmployeeName = "SAMPLE NAME";
EmployeeCode = 4813;
}
);
RequestTypeCode = 5;
WFID = 99;
"WF_LevelID" = 2;
WorkFlowName = "EHL - Group HR (Kanchana/Asitha)";
}
);
};
}
私が欲しかったのは、これらの従業員コード、IntDateを個別に取得することです。NSDictionary
NSDictionary *summary = [resultJSON objectForKey:@"Attendance"];
そしてそれを私Viewcontroller method
がこのようにした私のViewcontrollerの内部に戻します。
` nsDicttendanceReqDate = [[ws GetWorkflowInfoAttendanceRequest:[NSString stringWithFormat:@"%d",usr.empCode] : @"5" :usr.stringRequestDate] copy];
dicDates= [nsDicttendanceReqDate objectForKey:@"Attendance"] ;
//dicDates=[nsDicttendanceReqDatey JSONValue];
NSLog(@"%d",[dicDates count]);
NSLog(@"DIC DATES%@",dicDates);
NSLog(@"%@",nsDicttendanceReqDate);
if ([nsDicttendanceReqDate count] > 0 ) {
NSLog(@"TESTING---------- %@",[dicDates valueForKey:@"EmployeeCode"]);
NSLog(@"TESTING---------- %@",[dicDates valueForKey:@"OutDate"] );
NSLog(@"TESTING---------- %@",[dicDates valueForKey:@"InDate"] );`
しかし、これらはparanthesisの内部に入っています。どうすればこれを解決できますか?誰でもこの値を抽出する方法を教えてくれます。