# How to create child nodes?

**URL:** <https://community.thunkable.com/t/how-to-create-child-nodes/361751>\
**Category:** Questions about Thunkable X\
**Created:** [December 11, 2019, 11:30am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751 "2019-12-11T11:30:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 11, 2019, 11:30am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/1 "2019-12-11T11:30:59Z")

</div>

Hello good day. I stopped working with the app inventor. I am now working with thunkable. Now I have a question. working on firebase. When I press the button, I add a school. I want to get teachers and students under this section.

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 11, 2019, 11:50am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/2 "2019-12-11T11:50:08Z")

</div>

![Adsız](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/7/3759cab73378edb7880ca68230bfa5b213926a66.png) ![Adsız1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec7631dad7f40dedc494f20817a9329f6946704f.png)

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 11, 2019, 11:50am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/3 "2019-12-11T11:50:16Z")

</div>

I think this is okay. Would you recommend another method?

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [December 12, 2019, 9:54pm UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/4 "2019-12-12T21:54:39Z")

</div>

Slightly better (or at least simpler) might be to use [Cloud variables](https://docs.thunkable.com/variables#app-stored-and-cloud-variables), which use Firebase, so you could use something like:

![Screen Shot 2019-12-12 at 1.45.05 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/da77b7633b1ae0dbcdb3344afaa4ffb1cd7da528.png)

The full `'create object'` would be the same as in your `'Realime_DB1 call Save'` example.

Hope this helps.

-Mark

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 16, 2019, 6:13am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/5 "2019-12-16T06:13:08Z")

</div>

thank you very much

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 17, 2019, 9:11am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/6 "2019-12-17T09:11:59Z")

</div>

I want a structure like the following on the firebase. but I can’t use a variable with create object. I’d appreciate it if you helped. Thank you

**school name 1**  
**Teachers**  
teacher no 1

- name  
-age  
…

teacher no 2  
-name  
-age  
…

**students**  
students number 1  
-name  
-age  
…  
student number 2  
-name  
-age  
…

**school name 2**  
**Teachers**  
teacher no 1

- name  
-age  
…

teacher number 2  
-name  
-age  
…

**students**  
student # 1  
-name  
-age  
…  
student number 2  
-name  
-age  
…

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 17, 2019, 9:38am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/7 "2019-12-17T09:38:19Z")

</div>

Hi,

One of the options

{  
“schools”: [  
{  
“name”: “”,  
“teachers”: [  
{  
“name”: “”,  
“age”: “”  
},  
{  
“name”: “”,  
“age”: “”  
}  
],  
“students”: [  
{  
“name”: “”,  
“age”: “”  
},  
{  
“name”: “”,  
“age”: “”  
}  
]  
},  
{  
“name”: “”,  
“teachers”: [  
{  
“name”: “”,  
“age”: “”  
},  
{  
“name”: “”,  
“age”: “”  
}  
],  
“students”: [  
{  
“name”: “”,  
“age”: “”  
},  
{  
“name”: “”,  
“age”: “”  
}  
]  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 17, 2019, 10:40am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/8 "2019-12-17T10:40:48Z")

</div>

I would like to add the teacher numbers with the variable at the bottom of the example.

 ![Adsız](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/1/e136c81c46c0f607676d9adc42d65c217c2b1671.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 17, 2019, 11:13am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/9 "2019-12-17T11:13:50Z")

</div>

I showed you an example. You can add as many fields to it as you need.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [December 17, 2019, 5:25pm UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/10 "2019-12-17T17:25:47Z")

</div>

> [@zekidemirci](#):
>
> I want a structure like the following on the firebase. but I can’t use a variable with create object.

Can you explain in some more detail why you say that you can’t use a variable with create object?

-Mark

---

<div class="post-metadata">

**Author:** ![zekidemirci](https://avatars.discourse-cdn.com/v4/letter/z/ce73a5/32.png) [@zekidemirci](https://community.thunkable.com/u/zekidemirci)\
**Post date:** [December 18, 2019, 7:35am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/11 "2019-12-18T07:35:39Z")

</div>

I did what I wanted. Thank you very much.

 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec32376a2c4bb6972bdc94d0cd4ca374b49adeff.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/how-to-create-child-nodes/361751/12 "2024-11-08T11:46:20Z")

</div>


