I have a problem with fetching data from Json response.
Here is an example data structure :
(
{
AT = \"\";
DId = 0;
Try this...
NSError *error;
Array1 = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
for(int i=0;i<[Array1 count];i++)
{
NSDictionary *dict1 = [Array1 objectAtIndex:i];
ATArray =[dict1 valueForKey:@"AT"];
DIdArray =[dict1 valueForKey:@"DId"];
DOArray =[dict1 valueForKey:@"DO"];
PLIdArray =[dict1 valueForKey:@"PLId"];
etc...
Array2=[dict1 valueForKey:@"PdCatList"];
for(int i=0;i<[Array2 count];i++)
{
NSDictionary *dict2 = [Array2 objectAtIndex:i];
PLIdArray =[dict2 valueForKey:@"PLId"];
PPCIdArray =[dict2 valueForKey:@"PPCId"];
etc…
Array3=[dict2 valueForKey:@"pdList"];
for(int i=0;i<[Array3 count];i++)
{
NSDictionary *dict3 = [Array3 objectAtIndex:i];
IsDisArray =[dict3 valueForKey:@"IsDis"];
IsPSArray =[dict3 valueForKey:@"IsPS"];
IsTArray =[dict3 valueForKey:@"IsT"];
PAArray =[dict3 valueForKey:@"PA"];
PCIdArray =[dict3 valueForKey:@"PCId"];
}
}
}