---
title: "objects(at:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phfetchresult/objects(at:)"
---

# objects(at:)

Returns an array containing the objects in the fetch result at the indexes in the specified index set.

## Declaration

```swift
func objects(at indexes: IndexSet) -> [ObjectType]
```

## Parameters

- `indexes`: An index set containing indexes within the bounds of the fetch result.

## Return Value

Return Value An array containing the objects in the fetch result at the indexes specified by indexes.

## Discussion

Discussion The ordering of the returned array follows the index set. That is, in the returned array, an object with a higher index in the index set comes after any object with a smaller index in the index set. Raises a range exception if any index in the index set is beyond the end of the fetch result (that is, greater than or equal to the value of the count property).

## See Also

### Querying a Fetch Result

- [contains(_:)](photos/phfetchresult/contains(_:).md)
- [count](photos/phfetchresult/count.md)
- [countOfAssets(with:)](photos/phfetchresult/countofassets(with:).md)
- [firstObject](photos/phfetchresult/firstobject.md)
- [lastObject](photos/phfetchresult/lastobject.md)
- [object(at:)](photos/phfetchresult/object(at:).md)
- [subscript(_:)](photos/phfetchresult/subscript(_:).md)
