---
title: "descendant(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstreenode/descendant(at:)"
---

# descendant(at:)

Returns the receiver’s descendant at the specified index path.

## Declaration

```swift
func descendant(at indexPath: IndexPath) -> NSTreeNode?
```

## Parameters

- `indexPath`: An index path specifying a descendant of the receiver.

## Return Value

Return Value A tree node, or nil if the node does not exist.

## See Also

### Getting information about a node

- [representedObject](appkit/nstreenode/representedobject.md)
- [indexPath](appkit/nstreenode/indexpath.md)
- [isLeaf](appkit/nstreenode/isleaf.md)
- [children](appkit/nstreenode/children.md)
- [mutableChildren](appkit/nstreenode/mutablechildren.md)
- [parent](appkit/nstreenode/parent.md)
