# Why can't I access nested database information?

**URL:** https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152
**Category:** Questions about Thunkable X
**Tags:** firebase, database
**Created:** [May 25, 2023, 3:09pm UTC](https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152 "2023-05-25T15:09:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bubbleclaire67hmwvw](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bubbleclaire67hmwvw](https://community.thunkable.com/u/bubbleclaire67hmwvw)
#### Post date: [May 25, 2023, 3:09pm UTC](https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152/1 "2023-05-25T15:09:29Z")

</div>

I have the following database of Firebase, under ‘c’ the user IDs are listed and for every user, I need to count the total occurence of 0’s or 1’s for the ‘route’ key.

With the following blocks, I have the userIDs stored in a list called driverList. I want to make another list with all the route values so I can count occurences of 1’s and 0’s but my for loop can’t append the route values into the driverListRoute list. Where could the problem be? Thank you so much.

![JyWNjBg](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d1b6fc4fef21f91c918fa68f7283cbbb728e894.png)

 ![OeECHQn](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/a/3a00bd16e0e96ddcd1ab943043892e09d41500f2.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 25, 2023, 4:47pm UTC](https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152/2 "2023-05-25T16:47:49Z")

</div>

That looks right to me. Have you tested the Firebase connection to make sure you can get **any** data from Firebase with your current console rules?

A simple test would be to set a label’s text to cloud variable “c/DDsSX536mjYBmWn4zZm1T2qW0252/route” and make sure that “0” is displayed.

Also, are you initializing `app variable driverListRoute` to an empty list?

---

<div class="post-metadata">

### Author: ![bubbleclaire67hmwvw](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bubbleclaire67hmwvw](https://community.thunkable.com/u/bubbleclaire67hmwvw)
#### Post date: [May 25, 2023, 7:23pm UTC](https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152/3 "2023-05-25T19:23:36Z")

</div>

Thank you I set the variable to null, didn’t know I needed to initialize it is an empty list. Solved my problem!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [August 23, 2023, 7:23pm UTC](https://community.thunkable.com/t/why-cant-i-access-nested-database-information/2436152/4 "2023-08-23T19:23:47Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
