title: How to get NSDictionary data into a UITableView
body: <p>I have 2 NSArrays that I'm trying to link together in an NSDictionary so that each <strong>providerName</strong> has a <strong>providerId</strong> associated with it. </p>
  
  <p>I expected the two arrays to be associated with each other using <code>self.providersDict = [NSDictionary dictionaryWithObjects:providerName forKeys:providerId];</code> and then the providerName to be displayed as the table cell title and the id as the table cell subtitle.</p>
  
  <p>At the moment I can't get the data  displayed on the UITable or even log out the dictionary using:</p>
  
  <pre><code>   for (id key in self.providersDict) {
      NSLog(@"key: %@, value: %@", key, [self.providersDict objectForKey:key]);
  }
  </code></pre>
  
  <p>declared in the .h:</p>
  
  <pre><code>NSArray *providerName;
  NSArray *providerId;
  
  @property (nonatomic, strong) NSDictionary *providersDict;
  </code></pre>
  
  <p>and in the viewDidLoad:</p>
  
  <pre><code>    providerName = [NSArray arrayWithObjects:@"provider1", @"provider2", @"provider3", nil];
      providerId = [NSArray arrayWithObjects:@"1", @"2", @"3", nil];
  
      self.providersDict = [NSDictionary dictionaryWithObjects:providerName
                                                             forKeys:providerId];
  </code></pre>
  
  <p>the UITable methods:</p>
  
  <pre><code>-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return [[self.providersDict allKeys] count];
  }
  
  
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  
  
   static NSString *unifiedID = @"aCellID";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:unifiedID];
      if (!cell) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:unifiedID];
  
  }
  
  for (id key in self.providersDict) {
      NSLog(@"key: %@, value: %@", key, [self.providersDict objectForKey:key]);
  }
  
  NSString *providerNameString = [self.providersDict objectForKey:@"provider"];
  NSString *providerIdString = [self.providersDict objectForKey:@"object"];
  cell.textLabel.text  = providerNameString;
  cell.detailTextLabel.text  = providerIdString;
  
  
  return cell;
  
  }
  </code></pre>
  
  <p>thanks for the help.</p>