views:

23

answers:

0

Hi,for plist of the form:

 Root-->
   item1--->
   item2--->

....

how can i obtain the count of the number of item1,2,3 etc? instead of using this:

int i = 0;
for(i=0; i<10; i++) //loop 9 times cos database got 10
{

    NSDictionary *item1 = [array2 objectAtIndex:i]; 

i<10 is what i want to change

also for this plist:

 Root-->

   ABC---> item1
      ---> item2

   XYZ---> item1
      ---> item2
      ---> item3

....

how can i get the count of item 1,2,3,4 etc. as int for ABC, it will return 2, for XYZ it will return 3.

THks