Loop through NSDictionary

I have a large NSDictionary that I need to loop.I have to get parentfolderID from response. If parentfolderID is 0 it has to show name is author process and if parentfolderID is 1 it has to show names by response .How to get the parentfolderid then check condiction is it 0 or 1 then get the name with in the forloop.I am new to IOS Development.Can anyone say how should i do it ?.

(

    {
    ID = 1;
    Name = "Author Process";
    ParentFolderID = 0;
},
    {
    ID = 23;
    Name = "HR Process";
    ParentFolderID = 1;
},
    {
    ID = 22;
    Name = "IT Process";
    ParentFolderID = 1;
},
    {
    ID = 21;
    Name = "Sales Process";
    ParentFolderID = 1;
},
    {
    ID = 24;
    Name = "Services Process";
    ParentFolderID = 1;
}

)

I have tried this code :

for (NSDictionary *itemDic in itemArray)
{

        NSString *ID = [itemDic objectForKey:@"ID"]; // check null if need
           NSLog(@"ID %@",ID);
        NSNumber *Name = (NSNumber *)[itemDic objectForKey:@"Name"];
          NSLog(@"Name %@",Name);
        NSNumber *ParentFolderID = (NSNumber *)[itemDic objectForKey:@"ParentFolderID"];
        NSLog(@"ParentFolderID %@",ParentFolderID);

    }


Download loop.through.nsdictionary.zip
Direct Link


Download


Download loop.through.nsdictionary.zip
Mediafire


Download


Download loop.through.nsdictionary.zip
Ryushare


Download


Download loop.through.nsdictionary.zip
Gboxes


Download


Download loop.through.nsdictionary.zip
DropBox


Download

Both comments and pings are currently closed.

Comments are closed.