# \[SOLVED\]Nested object from JSON

**URL:** <https://community.thunkable.com/t/solved-nested-object-from-json/2873229>\
**Category:** Web API's\
**Created:** [March 4, 2024, 3:58pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229 "2024-03-04T15:58:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbapp](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@nbapp](https://community.thunkable.com/u/nbapp)\
**Post date:** [March 4, 2024, 3:58pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229/1 "2024-03-04T15:58:18Z")

</div>

Hi Everyone,  
I trying to get some values of an object from JSON (please see image below)…

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

If I want the value of “status” this is easy because it’s not a nested object and I can solve the problem with these blocks…

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

…but if I want to get the value: 715 km, how can I do?  
because I’m getting lost with nested objects.

Thanks for the help!

---

<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:** [March 4, 2024, 4:19pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229/2 "2024-03-04T16:19:40Z")

</div>

Hello @nbapp  
Here are the blocks that you need to get the text value:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/50e803259a09eacfe0dfe44addd10cb73b3f2980.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:** [March 4, 2024, 5:08pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229/3 "2024-03-04T17:08:47Z")

</div>

If you prefer, you can shorten all those blocks to a single `get property of object` block and get the property “**rows[1].elements[1].distance.text**” from the object.

Make sure to `get object from JSON` though since the green `response` block is not an object but rather JSON text.

I explain that in one of the comments in this tutorial topic: [API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575)

---

<div class="post-metadata">

**Author:** ![nbapp](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@nbapp](https://community.thunkable.com/u/nbapp)\
**Post date:** [March 4, 2024, 5:15pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229/4 "2024-03-04T17:15:47Z")

</div>

Thank you guys!

with this little addition I solved my problem.  
Please see image below…

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

Thanks again!

---

<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:** [March 4, 2024, 10:13pm UTC](https://community.thunkable.com/t/solved-nested-object-from-json/2873229/5 "2024-03-04T22:13:19Z")

</div>


