title: Grouping Data From Server without Alphabetical Sorting
body: <p>I want group data as it is from web service,i have done it using dictionary but it sorts in alphabetical order,i don't want sorting ,i want it to display as it is in web service.</p>
  
  <pre><code>   self.searchSections = [[NSMutableDictionary alloc] init];
  
     NSError *error = nil;
     NSDictionary *xmlDict = [XMLReader dictionaryForXMLString:Str error:&amp;error];
  
     NSArray *leaguelist = [[[xmlDict objectForKey:@"GetLeagueNamesListOutput"] objectForKey:@"Leagues"] objectForKey:@"eLeagueMst"];
  
      if (leaguelist.count&gt;0)
      {
          if (![leaguelist isKindOfClass:[NSArray class]])
          {
              // if 'list' isn't an array, we create a new array containing our object
              leaguelist = [NSArray arrayWithObject:leaguelist];
          }
  
          // we can loop through items safely now
          for (NSDictionary *item in leaguelist)
          {
              NSString *c = [[item objectForKey:@"CountryName"] objectForKey:@"text"];
              found = NO;
  
              for (NSString *str in [self.searchSections allKeys])
              {
                  if ([str isEqualToString:c])
                  {
                      found = YES;
                  }
              }
  
              if (!found)
              {
                  [self.searchSections setValue:[[NSMutableArray alloc] init] forKey:c];
              }
          }
  
          // Loop again and sort the books into their respective keys
          for (NSDictionary *book in leaguelist)
          {
              [[self.searchSections objectForKey:[[book objectForKey:@"CountryName"] objectForKey:@"text"]] addObject:book];
          }
  </code></pre>