title: Xcode how to parse Json Objects
body: <p>I manage to get Json for my server and parse in Xcode , I can then convert Json to a object and loaded my uitableview, the problems is my Json have 7 objects .. </p>
  
  <p>you can see the <a href="http://pastebin.com/svyrDHtg" rel="nofollow">full Json here</a></p>
  
  <pre><code>2012-05-05 10:45:02.727 passingdata[63856:fb03] array : {
      posts =     {
          Friday =         (
                          {
                  GymClass =                 {
                      "CLASS-TYPE2" = "";
                      "CLASS_LEVEL" = "Intro/General";
                      "CLASS_TYPE" = "Muay Thai";
                      "DAY_OF_WEEK" = Friday;
                      TIME = "13:00 - 14:30";
                  };
              }
          );
          Monday =         (
                          {
                  GymClass =                 {
                      "CLASS-TYPE2" = "Fighters Training";
                      "CLASS_LEVEL" = "Fighters/Advanced/Intermediate";
                      "CLASS_TYPE" = "Muay Thai ";
                      "DAY_OF_WEEK" = Monday;
                      TIME = "09:30 - 11:00";
                  };
              }, ......
  </code></pre>
  
  <p>with this code I can get friday's "Friday" and display the GymClass info "GymClass" on my table</p>
  
  <pre><code>- (void)fetchedData:(NSData *)responseData { //parse out the json data
  
      searchResults2 = [NSMutableArray arrayWithCapacity:10];
  
      NSError* error;
      NSDictionary* dictionary = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
  
      NSLog(@"array : %@",dictionary);
      NSArray *array = [[dictionary objectForKey:@"posts"] objectForKey:@"Friday"]; // retrieve that Day Gym Classes
  
      if (array == nil) {
          NSLog(@"Expected 'posts' array");
          return;
            }
  
      for (NSDictionary *resultDict in array) 
      {
          SearchResult *searchResult3;
          searchResult3 = [self parseTrack:resultDict];
  
          if (searchResult3 != nil) {
             [searchResults2 addObject:searchResult3];
          }        
      }    
      [self.tableView reloadData];
  }
  
  - (SearchResult *)parseTrack:(NSDictionary *)dictionary
  {
      SearchResult *searchResult1 = [[SearchResult alloc] init];
  
      searchResult1.classType= [[dictionary objectForKey:@"GymClass"] objectForKey:@"CLASS_TYPE"];
      searchResult1.classLevel= [[dictionary objectForKey:@"GymClass"] objectForKey:@"CLASS_LEVEL"];
  
      NSLog(@"parse track = %@", searchResult1);
      return searchResult1;
  }
  </code></pre>
  
  <p>I can get the elements for one day but how do I get the Elements for every day (Mon,Tue...Sun)so i can display on my table by sections?</p>
  
  <p>thanks for your help..</p>