# Getting node through javascript

**URL:** https://forum.deepar.ai/t/getting-node-through-javascript/277
**Category:** Studio
**Created:** [April 29, 2023, 5:52pm UTC](https://forum.deepar.ai/t/getting-node-through-javascript/277 "2023-04-29T17:52:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![afan\_sher](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/afan_sher/32/191_2.png) [@afan\_sher](https://forum.deepar.ai/u/afan_sher)
#### Post date: [April 29, 2023, 5:52pm UTC](https://forum.deepar.ai/t/getting-node-through-javascript/277/1 "2023-04-29T17:52:36Z")

</div>

![image](https://europe1.discourse-cdn.com/flex017/uploads/deepar/original/1X/d47b50c44ee5b85b1ed114d9ffea3dfb5295afc0.png)  
how can i get Ball mesh through javascript in this

Node.root.getChild(“Ball”); is not working for me

---

<div class="post-metadata">

### Author: ![antonio](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/antonio/32/57_2.png) [@antonio](https://forum.deepar.ai/u/antonio)
#### Post date: [May 1, 2023, 4:08pm UTC](https://forum.deepar.ai/t/getting-node-through-javascript/277/2 "2023-05-01T16:08:13Z")

</div>

The `getChild()` method only searches the node’s immediate children, not descendants. In this case, you would need to specify the full hierarchy like this:

```auto
var ballNode = Node.root.getChild("Wayfarer.fbx").getChild("Wayfarer").getChild("RayBanLow").getChild("Ball");

```
