title: Get objectAtIndex from NSMutableDictionary
body: <p>In my app, I'm working with <code>UISearchBar</code> where user will search from an <code>NSMutableArray</code> by searching with user name. Here is my method for searching user from <code>NSMutableArray</code></p>
  
  <pre><code>- (void)searchTableList
  {
      NSString *searchString = searchBar.text;
  
      NSMutableArray *searchArray = [[NSMutableArray alloc] init];
  
      for (NSDictionary *dictionary in contentList)
      {
  
          NSArray *array = [dictionary objectForKey:@"username"];
          [searchArray addObject:array];
      }
  
      for (NSString *sTemp in searchArray)
      {
          NSRange titleResultsRange = [sTemp rangeOfString:searchString options:NSCaseInsensitiveSearch];
  
          if (titleResultsRange.length &gt; 0)
              [filteredContentList addObject:sTemp];
      }
  }
  </code></pre>
  
  <p>And Here is how I'm configuring <code>UITableView</code> for showing search results</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      static NSString *CellIdentifier = @"SearchListTableViewCell";
      NSMutableDictionary *dict=[contentList objectAtIndex:indexPath.row];
      SearchListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if(cell == nil)
      {
          NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"SearchListTableViewCell" owner:nil options:nil];
          cell = (SearchListTableViewCell*)[topLevelObjects objectAtIndex:0];
          cell.backgroundColor=[UIColor colorWithRed:239.0/255 green:239.0/255 blue:239.0/255 alpha:1];
          [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
      }
  
      // Configure the cell...
      if (isSearching)
      {
          cell.friendName.text = [filteredContentList objectAtIndex:indexPath.row];
              NSMutableArray *searchImageArray=[[NSMutableArray alloc]init];
          for (NSDictionary *dictionary in contentList)
          {
  
              NSArray *imageArray=[dictionary objectForKey:@"thumbnail_path_150_150"];
              NSLog(@"image arrayt is %@",imageArray);
              [searchImageArray addObject:imageArray];
          }
  
          for (NSString *imageS in searchImageArray) {
              NSRange title=[imageS rangeOfString:cell.friendName.text options:NSCaseInsensitiveSearch];
              if (title.length&gt;0) {
                  [filteredImage addObject:imageS];
              }
          }
          NSString *url=[NSString stringWithFormat:@"%@/get_image?avatar=%@",BaseURL,[filteredImage objectAtIndex:indexPath.row]];
          url=[url stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
          UIImage* myImage = [UIImage imageWithData:
                              [NSData dataWithContentsOfURL:
                               [NSURL URLWithString:url]]];
          [cell.friendProfileImage setImage:myImage];
          NSLog(@"filtered Image data %lu",(unsigned long)filteredImage.count);
          NSLog(@"filtered content list data %lu",(unsigned long)filteredContentList.count);
      }
      else
      {
          cell.friendName.text =[dict objectForKey:@"username"];
          NSString *url=[NSString stringWithFormat:@"%@/get_image?avatar=%@",BaseURL,[dict objectForKey:@"thumbnail_path_150_150"]];
          url=[url stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
          UIImage* myImage = [UIImage imageWithData:
                              [NSData dataWithContentsOfURL:
                               [NSURL URLWithString:url]]];
          [cell.friendProfileImage setImage:myImage];
      }
      return cell;
  }
  </code></pre>
  
  <p>Now I want to fetch the rest data of searched user name from <code>NSMutableDictionary</code>. Here is my dictionary.</p>
  
  <pre><code>(
          {
          jid = "hey@196.0.0.1";
          "thumbnail_path_150_150" = "E\\path\\to\\getImage\\files\\heythumbnail";
          username = hey;
      },
          {
          jid = "tweety@196.0.0.1";
          "thumbnail_path_150_150" = "E:\\path\\to\\getImage\\files\\tweetythumbnail";
          username = tweety;
      }
  )
  </code></pre>
  
  <p>Here I want to get the image of searched user. If user searches hey, It must show <code>"thumbnail_path_150_150"
  ="E\\path\\to\\getImage\\files\\heythumbnail";</code> this image on tableViewCell. I tried my code for setting image But it replaces image when two users have same name. Like if one user is Ray and another is Blueray , then it changes the image of both. I know i wrote too much. But I'm really confused at this point. Please anyone help solving this issue.</p>