---
title: "childrenKeyPath(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstreecontroller/childrenkeypath(for:)"
---

# childrenKeyPath(for:)

Returns the key path used to find the children in the specified tree node.

## Declaration

```swift
func childrenKeyPath(for node: NSTreeNode) -> String?
```

## Parameters

- `node`: A tree node in the tree controller’s content.

## Return Value

Return Value A string containing the key path in node that provides the child nodes.

## See Also

### Specifying model attributes

- [childrenKeyPath](appkit/nstreecontroller/childrenkeypath.md)
- [countKeyPath](appkit/nstreecontroller/countkeypath.md)
- [countKeyPath(for:)](appkit/nstreecontroller/countkeypath(for:).md)
- [leafKeyPath](appkit/nstreecontroller/leafkeypath.md)
- [leafKeyPath(for:)](appkit/nstreecontroller/leafkeypath(for:).md)
