---
title: Resource::getParent
type: method
---

Returns the parent [Resource](resource-object) of a child resource.

<div class='spec'>

resource.getParent()

</div>

If the resource does not have a parent because it is already a top-level resource, the result will be `null`.
