<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSFetchedResultsController/indexPath(forObject:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFetchedResultsController(im)indexPathForObject:"
  },
  "title" : "indexPath(forObject:)"
}
-->

# indexPath(forObject:)

Returns the index path of a given object.

```
func indexPath(forObject object: ResultType) -> IndexPath?
```

## Parameters

`object`

An object in the receiver’s fetch results.

## Return Value

The index path of `object` in the receiver’s fetch results, or `nil` if `object` could not be found.

## Discussion

In versions of iOS before 3.2, this method raises an exception if `object` is not contained in the receiver’s fetch results.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)