# Extract data from Firebase

**URL:** <https://community.thunkable.com/t/extract-data-from-firebase/133752>\
**Category:** Questions about Thunkable X\
**Created:** [July 6, 2019, 9:28am UTC](https://community.thunkable.com/t/extract-data-from-firebase/133752 "2019-07-06T09:28:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [July 6, 2019, 9:28am UTC](https://community.thunkable.com/t/extract-data-from-firebase/133752/1 "2019-07-06T09:28:13Z")

</div>

I know its easy but can’t wrap my head around this. I have a set of data stored per user ID in firebase. For each user, I want to get the lat & lon datas so I create a marker on the map. My challenge now is how to get the lat and lon data the easiest way within the for each loop statement:

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

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [July 6, 2019, 11:01pm UTC](https://community.thunkable.com/t/extract-data-from-firebase/133752/3 "2019-07-06T23:01:15Z")

</div>

Sorry, I completely misread your question, and answered incorrectly.

For each user, what I do is make a csv string in firebase and call it **all users** or something like that. Then to display all the users data or to search in a list then use that. Now to find the data you must make sure that your objects and values follow a strict pattern/format, so you can simply substitute variables to find what you need.

From looking at your photo you shared, you will have a lot more **loc123456…** values. If a user wants to select specific possible locations, you must create another tag and make a csv string in this format:

**loc6773038,loc677354**

This way a user can select from this list, and then following a strict format find what they need inside the users tag.

Is this what you meant?

---

<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:** [July 7, 2019, 7:37am UTC](https://community.thunkable.com/t/extract-data-from-firebase/133752/4 "2019-07-07T07:37:21Z")

</div>

There are several ways.

An example for simple root objects like on your(scrFirebase screen)

[https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/](https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/)

Algorithm for very complex root objects

Add a prefix to all node names of parent objects that the user cannot enter. This can be one or more characters, for example:

```
“⊙loc6773038”
“⊙loc677354”

```

1. Make a list of objects. To do this, you need to find the position ⊙, then the position of the first character " and add to the list a line from to the found character"

2. Repeat step 1 for all found ⊙

After that you will have a list of object identifiers, with which you can compile a path to the values ​​of any of their fields.

---

<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, 12:12pm UTC](https://community.thunkable.com/t/extract-data-from-firebase/133752/5 "2024-11-08T12:12:19Z")

</div>


