title: Make an array equal to another array for specific objects
body: <p>What I'm trying to do is to make an array equal to another but for specific objects. Like the second array holds a lot of objects and I want the first array to take specific objects from the second array and then return it in NumberOfRowsInSection. </p>
  
  <p>Here is what I tried but it returns nothing:</p>
  
  <pre><code>-(NSInteger) tableView: (UITableView * ) tableView numberOfRowsInSection: (NSINteger) section {
  
       NSArray *array;
      NSString * foundString;
      NSInteger i;
      for (i = 0; i &lt; [LabelFilesArray count]; i++) {
          if ([[[LabelFilesArray objectAtIndex: i] objectForKey: @"teamSide"] isEqualToString: @"test2"]) {
              array = [LabelFilesArray objectAtIndex: i] ObjectForKey: @"teamSide"]; //Here is my problem.
              foundString = @"found";
              if ([foundString isEqualToString: @"found"]) {
                  break;
              }
          }
      }
      return array.count; //it returns nothing
  }
  </code></pre>