title: NSInternalInconsistencyException
body: <p>I'm trying to remove last two value from array. So, i used to do below code - </p>
  
  <pre><code>-(void)connectionDidFinishLoading:(NSURLConnection *)connection
  {
  
      NSString *resMsg = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
      NSData *responseData = [resMsg dataUsingEncoding:NSUTF8StringEncoding];
  
      NSError *error = nil;
  
      if (responseData != nil) 
      {
  
          array = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&amp;error];
  
          if([array count] == 2) {
  
          }else
          {
               int k = [self.array count] -2 ;
               int l = [self.array count] -1 ;
  
               [self.array removeObjectAtIndex:l];
               [self.array removeObjectAtIndex:k];
  
               [gridTable reloadData];
               [tblProducts reloadData];
           }
  
      }
  
  }
  </code></pre>
  
  <p>But, its giving below exception - </p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFArray removeObjectAtIndex:]: mutating method sent to immutable object'</p>
  </blockquote>
  
  <p>I don't know why this happened? I've already used this method in another viewController class too. It was working fine there. But, here its giving exception.</p>