---
title: topLevelObject
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsscriptexecutioncontext/toplevelobject
---

# topLevelObject

Sets the top-level object for an object-specifier evaluation.

## Declaration

```swift
var topLevelObject: Any? { get set }
```

## Parameters

- `anObject`: The top-level object for an object-specifier evaluation.

## See Also

### Getting and setting the container object

- [objectBeingTested](foundation/nsscriptexecutioncontext/objectbeingtested.md)
- [rangeContainerObject](foundation/nsscriptexecutioncontext/rangecontainerobject.md)
