---
title: "indexPath(forObject:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsfetchedresultscontroller/indexpath(forobject:)"
---

# indexPath(forObject:)

Returns the index path of a given object.

## Declaration

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

## Parameters

- `object`: An object in the receiver’s fetch results.

## Return Value

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

## Discussion

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

## See Also

### Accessing Results

- [fetchedObjects](coredata/nsfetchedresultscontroller/fetchedobjects.md)
- [object(at:)](coredata/nsfetchedresultscontroller/object(at:).md)
