23
Views
4
Comments
Solved
[Google Places] How to retrieve further information from JSON file
Question
google-places
Web icon
Forge asset by Ouen Worth

How do you retrieve further information from the JSON file such as State, for instance I see the information in the JSON file {"long_name":"Queensland","short_name":"QLD","types":["administrative_area_level_1","political"]},


How do i retrieve Queensland or QLD? 

2026-03-16 11-57-10
Charles Papp
Solution

You will need to loop through the Address_components of the Results and test for Types = "administrative_area_level_1". When you find a match, then you can assign the Long_name or the Short_Name to the target object or variable that you want to use it with.

Is this enough detail to get you unstuck?

UserImage.jpg
Talis Krumins

Charles Papp wrote:

You will need to loop through the Address_components of the Results and test for Types = "administrative_area_level_1". When you find a match, then you can assign the Long_name or the Short_Name to the target object or variable that you want to use it with.

Is this enough detail to get you unstuck?

Hi Charles,


A little (a lot) more detail would be useful. This would be my first time trying to do something of that nature, so as much detail as you're willing to give would be very useful. 


UserImage.jpg
Talis Krumins

Talis Krumins wrote:

Charles Papp wrote:

You will need to loop through the Address_components of the Results and test for Types = "administrative_area_level_1". When you find a match, then you can assign the Long_name or the Short_Name to the target object or variable that you want to use it with.

Is this enough detail to get you unstuck?

Hi Charles,


A little (a lot) more detail would be useful. This would be my first time trying to do something of that nature, so as much detail as you're willing to give would be very useful. 



Never mind, worked it out. Thanks for your help! 

2026-03-16 11-57-10
Charles Papp

Sorry, I didn't have time yet to reply in more detail, but I'm glad you worked it out. :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.