title: Extracting information from a JSON
body: <p>I would like to get the average temperature. I'm not any good with recognising formats but I'm pretty sure result is parsed json. To see how I'm using results and what I've already tired to do here is the code I'm using along with the openWeatherMapAPI iOS wrapper link:</p>
  
  <p><a href="https://github.com/adba/OpenWeatherMapAPI" rel="nofollow">https://github.com/adba/OpenWeatherMapAPI</a></p>
  
  <p>I run this method: </p>
  
  <pre><code>[weatherAPI dailyForecastWeatherByCityName:destination 
                                   withCount:time 
                                 andCallback:^(NSError *error, NSDictionary *result) { 
  </code></pre>
  
  <p>result looks like this: </p>
  
  <pre><code> clouds = 32;
      deg = 123;
      dt = "2013-12-02 11:00:00 +0000";
      humidity = 86;
      pressure = "1039.92";
      speed = "1.41";
      temp =     {
          day = "8.429986572265648";
          eve = "6.420007324218773";
          max = "8.429986572265648";
          min = "1.339990234375023";
          morn = "2.189996337890648";
          night = "1.339990234375023";
      };
      weather =     (
                  {
              description = "nuages \U00e9parses";
              icon = 03d;
              id = 802;
              main = Clouds;
          }
      );
  }
  </code></pre>
  
  <p>.h:</p>
  
  <pre><code>OWMWeatherAPI *weatherAPI;
  
  NSArray *forecast;
  NSDateFormatter *dateFormatter;
  </code></pre>
  
  <p>.m:</p>
  
  <pre><code>    [weatherAPI dailyForecastWeatherByCityName:destination withCount:time andCallback:^(NSError *error, NSDictionary *result) {
          if (error) {
  
              [activityIndicator stopAnimating];
              activityIndicator.hidden = YES;
  
              UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Please verify you have an internet connection and that the city name is spelled correclty with no spaces afterwars or before it." delegate:Nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
  
              [alert show];
          }
  
          // The data is ready
  
          forecast = result[@"list"];
  
          [self.forecastTableView reloadData];
      }];
  }
  
  #pragma mark - forecast tableview datasource
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  
      return forecast.count;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
      if (!cell) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"Cell"];
      }
  
      NSDictionary *forecastData = [forecast objectAtIndex:indexPath.row];
  
      cell.textLabel.text = [NSString stringWithFormat:@"%.1f℃ - %@", [forecastData[@"main"][@"temp"] floatValue], forecastData[@"weather"][0][@"main"]
                             ];
  
      cell.detailTextLabel.text = [dateFormatter stringFromDate:forecastData[@"dt"]];
  
      return cell;
  }
  </code></pre>