<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTreeController/childrenKeyPath(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTreeController(im)childrenKeyPathForNode:"
  },
  "title" : "childrenKeyPath(for:)"
}
-->

# childrenKeyPath(for:)

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

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

## Parameters

`node`

A tree node in the tree controller’s content.

## Return Value

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)