Here is the way to find the index of a NSObject in a NSArray.

We can use indexOfObject of NSArray to get the index of a NSString or any NSObject in the array.

This is done based on the contents of the object at that index.

There is “indexOfObjectIdenticalTo” which  brings the exact object’s index from the array.

The former uses “isEqual” method to find the object in the array. The later checks for an object with the same id(same object) in the array.

And if your array is of huge size, then you may bring in performance bottleneck to your app, because the Search to be conducted in to your array is going to be linear search.

If some one have solution for it, please provide it.