# Extracting values from Json (Reverse Geocoding Google Map API )

**URL:** <https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641>\
**Category:** Questions about Thunkable X\
**Created:** [July 10, 2020, 1:35am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641 "2020-07-10T01:35:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![boris.hernandez](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@boris.hernandez](https://community.thunkable.com/u/boris.hernandez)\
**Post date:** [July 10, 2020, 1:35am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/1 "2020-07-10T01:35:33Z")

</div>

Hi,  
I need assistance in extracting the values display under property “long\_name” under “address\_components” list; so I can get the enterie address base on a latitude and logitude values; I’m using the location sensor component and a web api from google maps  
Thanks,

the json that comes out of the google geocoding api is:

{  
“plus\_code” : {  
“compound\_code” : “RHR3+98 Santa Lucia, El Salvador”,  
“global\_code” : “765GRHR3+98”  
},  
“results” : [  
{  
“address\_components” : [  
{  
“long\_name” : “Calle Francisco Gavidia”,  
“short\_name” : “Calle Francisco Gavidia”,  
“types” : [“route”]  
},  
{  
“long\_name” : “Ciudad Arce”,  
“short\_name” : “Cd Arce”,  
“types” : [“locality”, “political”]  
},  
{  
“long\_name” : “Ciudad Arce”,  
“short\_name” : “Cd Arce”,  
“types” : [“administrative\_area\_level\_2”, “political”]  
},  
{  
“long\_name” : “La Libertad”,  
“short\_name” : “La Libertad”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “Calle Francisco Gavidia, Cd Arce, El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 13.841047,  
“lng” : -89.44653409999999  
},  
“southwest” : {  
“lat” : 13.8408049,  
“lng” : -89.44662219999999  
}  
},  
“location” : {  
“lat” : 13.8409264,  
“lng” : -89.44657699999999  
},  
“location\_type” : “GEOMETRIC\_CENTER”,  
“viewport” : {  
“northeast” : {  
“lat” : 13.8422749302915,  
“lng” : -89.44522916970848  
},  
“southwest” : {  
“lat” : 13.8395769697085,  
“lng” : -89.44792713029149  
}  
}  
},  
“place\_id” : “ChIJC5bVJcPeYo8R6st1j-xy\_Ms”,  
“types” : [“route”]  
},  
{  
“address\_components” : [  
{  
“long\_name” : “Ciudad Arce Centro”,  
“short\_name” : “Cd Arce Centro”,  
“types” : [“neighborhood”, “political”]  
},  
{  
“long\_name” : “Santa Lucia”,  
“short\_name” : “Santa Lucia”,  
“types” : [“locality”, “political”]  
},  
{  
“long\_name” : “Ciudad Arce”,  
“short\_name” : “Cd Arce”,  
“types” : [“administrative\_area\_level\_2”, “political”]  
},  
{  
“long\_name” : “La Libertad”,  
“short\_name” : “La Libertad”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “Cd Arce Centro, Santa Lucia, El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 13.8445803,  
“lng” : -89.44004059999999  
},  
“southwest” : {  
“lat” : 13.8367674,  
“lng” : -89.4481945  
}  
},  
“location” : {  
“lat” : 13.8391144,  
“lng” : -89.4440774  
},  
“location\_type” : “APPROXIMATE”,  
“viewport” : {  
“northeast” : {  
“lat” : 13.8445803,  
“lng” : -89.44004059999999  
},  
“southwest” : {  
“lat” : 13.8367674,  
“lng” : -89.4481945  
}  
}  
},  
“place\_id” : “ChIJ9fji6NzeYo8R3iLj-UUGxg4”,  
“types” : [“neighborhood”, “political”]  
},  
{  
“address\_components” : [  
{  
“long\_name” : “Santa Lucia”,  
“short\_name” : “Santa Lucia”,  
“types” : [“locality”, “political”]  
},  
{  
“long\_name” : “Ciudad Arce”,  
“short\_name” : “Cd Arce”,  
“types” : [“administrative\_area\_level\_2”, “political”]  
},  
{  
“long\_name” : “La Libertad”,  
“short\_name” : “La Libertad”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “Santa Lucia, El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 13.8498722,  
“lng” : -89.41884039999999  
},  
“southwest” : {  
“lat” : 13.8189031,  
“lng” : -89.45274350000001  
}  
},  
“location” : {  
“lat” : 13.8354794,  
“lng” : -89.4387562  
},  
“location\_type” : “APPROXIMATE”,  
“viewport” : {  
“northeast” : {  
“lat” : 13.8498722,  
“lng” : -89.41884039999999  
},  
“southwest” : {  
“lat” : 13.8189031,  
“lng” : -89.45274350000001  
}  
}  
},  
“place\_id” : “ChIJb6L\_kSffYo8RB4JT3\_9nCKs”,  
“types” : [“locality”, “political”]  
},  
{  
“address\_components” : [  
{  
“long\_name” : “Ciudad Arce”,  
“short\_name” : “Ciudad Arce”,  
“types” : [“administrative\_area\_level\_2”, “political”]  
},  
{  
“long\_name” : “La Libertad Department”,  
“short\_name” : “La Libertad Department”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “Ciudad Arce, El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 13.8794127,  
“lng” : -89.3895721  
},  
“southwest” : {  
“lat” : 13.7587273,  
“lng” : -89.47196959999999  
}  
},  
“location” : {  
“lat” : 13.7977568,  
“lng” : -89.41746409999999  
},  
“location\_type” : “APPROXIMATE”,  
“viewport” : {  
“northeast” : {  
“lat” : 13.8794127,  
“lng” : -89.3895721  
},  
“southwest” : {  
“lat” : 13.7587273,  
“lng” : -89.47196959999999  
}  
}  
},  
“place\_id” : “ChIJSfdXXNDYYo8R767pb8QwJd8”,  
“types” : [“administrative\_area\_level\_2”, “political”]  
},  
{  
“address\_components” : [  
{  
“long\_name” : “La Libertad Department”,  
“short\_name” : “La Libertad Department”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “La Libertad Department, El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 14.0608631,  
“lng” : -89.133437  
},  
“southwest” : {  
“lat” : 13.4222451,  
“lng” : -89.6249409  
}  
},  
“location” : {  
“lat” : 13.6817661,  
“lng” : -89.3606298  
},  
“location\_type” : “APPROXIMATE”,  
“viewport” : {  
“northeast” : {  
“lat” : 14.0608631,  
“lng” : -89.133437  
},  
“southwest” : {  
“lat” : 13.4222451,  
“lng” : -89.6249409  
}  
}  
},  
“place\_id” : “ChIJj7ku93kjY48RJGGpDtNMEcI”,  
“types” : [“administrative\_area\_level\_1”, “political”]  
},  
{  
“address\_components” : [  
{  
“long\_name” : “El Salvador”,  
“short\_name” : “SV”,  
“types” : [“country”, “political”]  
}  
],  
“formatted\_address” : “El Salvador”,  
“geometry” : {  
“bounds” : {  
“northeast” : {  
“lat” : 14.4505567,  
“lng” : -87.6682  
},  
“southwest” : {  
“lat” : 13.0473999,  
“lng” : -90.19229999999999  
}  
},  
“location” : {  
“lat” : 13.794185,  
“lng” : -88.89653  
},  
“location\_type” : “APPROXIMATE”,  
“viewport” : {  
“northeast” : {  
“lat” : 14.4505567,  
“lng” : -87.6682  
},  
“southwest” : {  
“lat” : 13.0473999,  
“lng” : -90.19229999999999  
}  
}  
},  
“place\_id” : “ChIJVwZkWaYnY48RMkiFmOsWmm8”,  
“types” : [“country”, “political”]  
}  
],  
“status” : “OK”  
}

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 13, 2020, 11:34am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/2 "2020-07-13T11:34:41Z")

</div>

Hey @boris.hernandez thanks for sharing 👍

The [object blocks](https://docs.thunkable.com/objects) are able to do exactly what you need.

Also, we have a great playlist with API resources you can watch here:

https://www.youtube.com/embed/rUnWhwHHmO4?feature=oembed&wmode=opaque&list=PLB89L9PPGIry11IQq0dyVG_aK6kUMHP1F

Hope that helps!

---

<div class="post-metadata">

**Author:** ![boris.hernandez](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@boris.hernandez](https://community.thunkable.com/u/boris.hernandez)\
**Post date:** [July 14, 2020, 12:15am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/3 "2020-07-14T00:15:57Z")

</div>

Thanks for your quick response  
I’ll review the videos sent  
kind regards,

---

<div class="post-metadata">

**Author:** ![rwplummer1yf4f](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@rwplummer1yf4f](https://community.thunkable.com/u/rwplummer1yf4f)\
**Post date:** [August 23, 2020, 7:47pm UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/4 "2020-08-23T19:47:10Z")

</div>

Hi Boris. Did you work out a solution to this problem? I am facing the same issues and could also use some help.

---

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [August 24, 2020, 11:01am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/5 "2020-08-24T11:01:28Z")

</div>

Before using the object blocks, I would normally use “Json editor” to view exactly where the info I wanted to extract resides, especially with nested levels. Cut and paste the whole JSON and it will present the data in readable objects levels. Then you can use the object blocks with the correct properties to access the data. Note that some of the data are contained in square brackets, those are in a “list” so you need to use list blocks to read them.

[https://jsoneditoronline.org/#left=local.lezuxu&right=local.fovoki](https://jsoneditoronline.org/#left=local.lezuxu&right=local.fovoki)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [August 24, 2020, 8:00pm UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/6 "2020-08-24T20:00:26Z")

</div>

I do the same @gobassky.

[https://jsonpathfinder.com/](https://jsonpathfinder.com/)

---

<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, 11:24am UTC](https://community.thunkable.com/t/extracting-values-from-json-reverse-geocoding-google-map-api/668641/7 "2024-11-08T11:24:11Z")

</div>


