title: How populate prototype cell text labels with NSDictionary object populated with JSON data using AFNetworking
body: <p>New to iOS.  I am downloading JSON data using AFNetworking and putting the data in a Dictionary object.  This is done in the following code: </p>
  
  <pre><code>-(void)locationRequest
  {
  NSURL *url = [NSURL URLWithString:@"http://sitespec/php/getlocations.php"];
  
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  //AFNetworking asynchronous url request
  AFJSONRequestOperation *operation = [AFJSONRequestOperation
                                       JSONRequestOperationWithRequest:request
                                       success:^(NSURLRequest *request, NSHTTPURLResponse         *response, id responseObject)
                                       {
  
                                           self.locationsFromJSON = (NSDictionary *)responseObject;
  
                                           NSLog(@"JSON RESULT %@", responseObject);
                                           NSLog(@"JSON DICTIONARY %@", _locationsFromJSON);
                                           [self.tableView reloadData];
                                       }
                                       failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id responseObject)
                                       {
                                           NSLog(@"Request Failed: %@, %@", error, error.userInfo);
                                       }];
  
  [operation start];
  
  }
  </code></pre>
  
  <p>I am getting the data and populating the Dictionary array as seen in the outpur of the NSLOG calls below: </p>
  
  <pre><code>2013-05-12 12:44:08.851 sitespec[2024:c07] JSON RESULT (
      {
      city = "Rocky Mount";
      id = 1;
      name = "Rocky Mount";
      phone = "(252) 451-1811";
      state = NC;
      "street_address" = "620 Health Drive";
      zip = 27804;
  },
      {
      city = "Elizabeth City";
      id = 2;
      name = "Elizabeth City";
      phone = "(252) 335-4355";
      state = NC;
      "street_address" = "109 Corporate Drive";
      zip = 27906;
  }
  )
  2013-05-12 12:44:08.852 sitespec[2024:c07] JSON DICTIONARY (
      {
      city = "Rocky Mount";
      id = 1;
      name = "Rocky Mount";
      phone = "(252) 451-1811";
      state = NC;
      "street_address" = "620 Health Drive";
      zip = 27804;
  },
      {
      city = "Elizabeth City";
      id = 2;
      name = "Elizabeth City";
      phone = "(252) 335-4355";
      state = NC;
      "street_address" = "109 Corporate Drive";
      zip = 27906;
  }
  )
  </code></pre>
  
  <p>BUT, here is where I am lost.....  </p>
  
  <p>How do I access this data in the Dictionary object in my </p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>method?  </p>
  
  <p>SOmething like: </p>
  
  <pre><code> static NSString *CellIdentifier = @"Cell";
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
  cell.textLabel.text = [self.locationsFromJSON objectForKey:@"name"]; 
  </code></pre>
  
  <p>???</p>
  
  <p>This is not working and I get a SIGBART error.  I just cant figure out how to read the data out and populate the table view?  </p>
  
  <p>How do I do this?  ANy help is GREATLY appreciated.....  </p>