[SOLVED]Nested object from JSON

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

image

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

…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!

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

1 Like

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)

1 Like

Thank you guys!

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

Thanks again!

2 Likes