title: How to compare each object of one NSMutableArray with other
body: <p>In <code>arr3</code> I want the index of the object from <code>arr1</code> when <code>arr1[k]==arr2[m]</code>.</p>
  
  <p>However, I am not getting the value in <code>arr3</code> because it must not satisfy if condition.</p>
  
  <p>How can I compare two NSMutableArray objects by their indices?</p>
  
  <pre><code>while (k&lt;=[arr1 count]-1 ) {
      for (m=0; m&lt;=[arr2 count]-1; m++) {
  
      if ([arr1 objectAtIndex:k]==[arr2 objectAtIndex:m]) {
          [arr3 addObject:k];
      }
      }
      k++;
  }
  </code></pre>