---
title: "object(at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsarray/object(at:)"
---

# object(at:)

Returns the object located at the specified index.

## Declaration

```swift
func object(at index: Int) -> Any
```

## Parameters

- `index`: An index within the bounds of the array.

## Return Value

Return Value The object located at index.

## Discussion

Discussion If index is beyond the end of the array (that is, if index is greater than or equal to the value returned by count), an rangeException is raised.

## See Also

### Querying an Array

- [contains(_:)](foundation/nsarray/contains(_:).md)
- [count](foundation/nsarray/count.md)
- [firstObject](foundation/nsarray/firstobject.md)
- [lastObject](foundation/nsarray/lastobject.md)
- [subscript(_:)](foundation/nsarray/subscript(_:).md)
- [objects(at:)](foundation/nsarray/objects(at:).md)
- [objectEnumerator()](foundation/nsarray/objectenumerator().md)
- [reverseObjectEnumerator()](foundation/nsarray/reverseobjectenumerator().md)
