# Clean json text with the get property of object blocks?

**URL:** <https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658>\
**Category:** Questions about Thunkable X\
**Created:** [January 27, 2021, 4:05pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658 "2021-01-27T16:05:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [January 27, 2021, 4:05pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/1 "2021-01-27T16:05:13Z")

</div>

I get this list from Firebase.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/a/5aaad220fe989f4a8667effe0618748287e5df9c.png)  
I like to get the handle and the Adress out of al 88 customers.  
Can I use these blocks to make it more simpel or how can I do this in the most simple way?  
This blocks DONT work???  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6a4bc80d4abe077aa5e56d3e9fa63e5da6423b43.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 27, 2021, 4:22pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/2 "2021-01-27T16:22:23Z")

</div>

I’m a little confused, in the `then do` block, you refer to a variable `bestof`. What does it contain?

If you are referring to it as the main key of your database then you need to refer to `bestofDB`

However, I would advise to use the cloud variable all the way instead of using the Get block of RTDB then you can refer to any object in the database by using indirect cloud variables.

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [January 27, 2021, 4:24pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/3 "2021-01-27T16:24:25Z")

</div>

yes but with over 100 lines it takes longer than just getting it one time.  
And the blocks dont work either that is just my way to try it…

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 27, 2021, 4:34pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/4 "2021-01-27T16:34:19Z")

</div>

Another thing,

Are you using the indirect variable naming for a specific reason?

 ![Screenshot_20210127_193721](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/3/63b8800d69dc5257c62a8521228968c05d2511fc.jpeg)

This is what I mean.

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [January 27, 2021, 4:38pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/5 "2021-01-27T16:38:43Z")

</div>

Muneer thanks for your feet back.  
No it was just so I dont need to go out in firebase for each item. There is a lot lines to get.  
Now I got these blocks and they dont work either, I am just trying something so dont mind how my blocks are looking. That is what I am asking for help to solve.I just cant find the docs to place the right blocks for doing this.

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

Aaarrh I se now I dont have to make that Variable. I just thourgt it was the same as if i used the cloud variable everytime…

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [January 27, 2021, 5:19pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/6 "2021-01-27T17:19:19Z")

</div>

for example in this case i try and get the property of address.

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

with these button. Why is it it dont work. What is it i do wrong.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/6/0664ed68ae78ee8dddacbc4834c103c408ad96c7.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:** [January 27, 2021, 5:36pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/7 "2021-01-27T17:36:36Z")

</div>

You are converting the Firebase value to JSON and then trying to take the property of an object from it. That won’t work because the “get property of object” block is expecting an object as input.

But there’s an easier way to do this because a cloud variable can be used instead of the Realtime\_DB block:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/b/8b98c588e026511794933e09919469ed6f9cc5b7.png)

You can also use cloud variables to set the value of Firebase fields:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/0/70ac18fce93696854a83e8597f8bb8b842990d14.png)

---

<div class="post-metadata">

**Author:** ![funhall](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/funhall/32/92145_2.png) [@funhall](https://community.thunkable.com/u/funhall)\
**Post date:** [January 27, 2021, 5:41pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/8 "2021-01-27T17:41:12Z")

</div>

yes thanks. But I am aware of that. But it just takes a long time to get all the customers in that way. That is why I like to get all the database and then sort it after importing. Do you know what I mean?  
This work fine but to slow…

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/5/35c383e0a98ad8bd64ab9531da92ab77c7ddf8a0.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, 1:30pm UTC](https://community.thunkable.com/t/clean-json-text-with-the-get-property-of-object-blocks/1071658/9 "2024-11-08T13:30:28Z")

</div>


