title: Can't map objects without using a table - RESTKit
body: <p>I'm doing a GET request with RESTKit, and I can't map objects without there being a table. I am able to map objects if there is a table. If I set the label inside the table to one object and a label that is on the background to another object, both labels show the correctly mapped objects. However, if I delete the table and leave just the label on the background, the mapping doesn't work and the label displays nothing. I would rather not have a table and would like to just map the objects from the JSON response to labels in the view controller. Here is my code with the GET request (BTW, the moreresultsVCSobj is for singletons that I'm using for global variables):</p>
  
  <pre><code>@interface MoreResultsViewController ()
  
  @property (strong, nonatomic) NSArray *moreInfo;
  
  @end
  
  @implementation MoreResultsViewController
  
  @synthesize nameLabel, idLabel = _idLabel, addressLabel = _addressLabel, specialtyGroupsLabel = _specialtyGroupsLabel, infoTableView;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      moreresultsVCSobj = [SingletonObject singleObj];
      //[DejalBezelActivityView activityViewForView:self.view];
  
      infoTableView.delegate = self;
      infoTableView.dataSource = self;
  
      [self displayInfo];
      [self getDoctorInfo];
  }
  
  - (void)getDoctorInfo
  {
      //NOTE NOTE NOTE: There is a weird error with this code where RESTKit only maps one (unknown) object. I don't know how to fix this problem. Currently this method just isn't called, meaning it won't run.
  
      //RK Logging
      RKLogConfigureByName("RestKit/Network", RKLogLevelTrace);
  
      NSIndexSet *statusCodeSet = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful);
      NSString *urlString = [NSString stringWithFormat:@"https://testGET.com/stuff/testGET];
      NSURL *url = [NSURL URLWithString:urlString];
      NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
      NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
      NSLog(@"Connection ==&gt; %@", connection);
  
      //HTTP Header
      NSMutableURLRequest *networksRequest = [NSMutableURLRequest requestWithURL:url];
      [networksRequest setValue:moreresultsVCSobj.userAuthToken forHTTPHeaderField:@"Auth-Token"];
  
      //Object Mapping
      RKObjectMapping *networkMapping = [RKObjectMapping mappingForClass:[Info class]];
      [networkMapping addAttributeMappingsFromDictionary:@{@"name": @"name", @"id": @"strenuusID", @"location_specialties.address_lines": @"address_lines"}];
  
      NSString *pathPatternString = [NSString stringWithFormat:@"/stuff/testGET"];
  
      //Response Descriptor
      RKResponseDescriptor *networksResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:networkMapping
                                                                                                      method:RKRequestMethodGET
                                                                                                 pathPattern:pathPatternString
                                                                                                     keyPath:@""
                                                                                                 statusCodes:statusCodeSet];
  
      RKObjectRequestOperation *networksOperation = [[RKObjectRequestOperation alloc] initWithRequest:networksRequest
                                                                                  responseDescriptors:@[networksResponseDescriptor]];
      [networksOperation setCompletionBlockWithSuccess:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)
       {
           NSLog(@"Mapping Results ==&gt; %@", mappingResult.array);
           self.moreInfo = mappingResult.array;
           [self.infoTableView reloadData];
           //[DejalBezelActivityView removeView];
       }
                                               failure:^(RKObjectRequestOperation *nameOperation, NSError *nameError)
       {
           NSLog(@"ERROR: %@", nameError);
           NSLog(@"Response: %@", nameOperation.HTTPRequestOperation.responseString);
           //[DejalBezelActivityView removeView];
       }];
      [networksOperation start];
  }
  
  //Number of Sections in the table
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  
  //This method runs when a row in the table is selected
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      //Deselects row
      [infoTableView deselectRowAtIndexPath:indexPath animated:YES];
  }
  
  // Customizes the number of rows in the table view.
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return self.moreInfo.count;
  }
  
  // Customize the appearance of table view cells. Pretty standard method and can be mostly reused minus 'cell.textLabel.text = -self.doctorNames objectAtIndex: [indexPath row]];
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *MoreInfoCellIdentifier = @"moreInfoCell";
      MoreInfoCell *cell = [self.infoTableView dequeueReusableCellWithIdentifier:MoreInfoCellIdentifier];
      Info *info = [self.moreInfo objectAtIndex:indexPath.row];
      [self configureCell:cell forInfo:info];
      return cell;
  }
  
  //Chooses what is displayed in the cell
  - (void)configureCell:(MoreInfoCell *)cell forInfo:(Info *)info
  {
      //Sets labels in cell
      cell.testLabel.text = info.strenuusID;
      nameLabel.text = info.name;
      NSLog(@"Doctor Name new GET: %@", info.strenuusID);
      NSLog(@"Address new GET: %@", info.address_lines);
      printf("\n");
  }
  
  
  - (void)displayInfo 
  {
      Info *info = [Info new];
      nameLabel.text = info.name;
      _idLabel.text = moreresultsVCSobj.doctorIDString;
      _addressLabel.text = moreresultsVCSobj.addressString;
      _specialtyGroupsLabel.text = moreresultsVCSobj.specialtyGroupsString;
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  @end
  </code></pre>