hi, for plist of the form:
Root-->
ABC---> item1
---> item2
XYZ---> item1
---> item2
---> item3
....
how can i get the count of item 1,2,3,4 etc. as in for ABC, it will return 2, for XYZ it will return 3.
THks
i use the following code:
where myString is what user enter, it will go to the database with the matching key.
but when i use the following code only:
my count value is always = 0. which is not what i want.
Root-->
ABC---> item1
---> item2
XYZ---> item1
---> item2
---> item3
....
how can i get the count of item 1,2,3,4 etc. as in for ABC, it will return 2, for XYZ it will return 3.
THks
i use the following code:
Code:
NSArray *arr = [NSArray arrayWithContentsOfFile:finalPath];
int count = 0;
for (NSDictionary *dict in arr) {
if([myString isEqualToString:[array3 objectForKey:myString]])
count += dict.count;
}
where myString is what user enter, it will go to the database with the matching key.
but when i use the following code only:
Code:
NSArray *arr = [NSArray arrayWithContentsOfFile:finalPath];
int count = 0;
for (NSDictionary *dict in arr) {
count += dict.count;
}
my count value is always = 0. which is not what i want.