Help with json result

Good morning, can any tiger please give me a clue on how to obtain the value highlighted in bold from the following json result.
“long_name” : “75007”,
“short_name” : “75007”,
“types” : [ “postal_code” ]

thank you…

{
   "plus_code" : {
      "compound_code" : "V75V+9Q5 París, Francia",
      "global_code" : "8FW4V75V+9Q5"
   },
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "75007",
               "short_name" : "75007",
               "types" : [ "postal_code" ]
            },
            {
               "long_name" : "París",
               "short_name" : "París",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "París",
               "short_name" : "París",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "Isla de Francia",
               "short_name" : "IDF",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "Francia",
               "short_name" : "FR",
               "types" : [ "country", "political" ]
            }
         ],
         "formatted_address" : "75007 París, Francia",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 48.8637587,
                  "lng" : 2.3332731
               },
               "southwest" : {
                  "lat" : 48.845927,
                  "lng" : 2.2898664
               }
            },
            "location" : {
               "lat" : 48.85433450000001,
               "lng" : 2.3134029
            },
            "location_type" : "APPROXIMATE",
            "viewport" : {
               "northeast" : {
                  "lat" : 48.8637587,
                  "lng" : 2.3332731
               },
               "southwest" : {
                  "lat" : 48.845927,
                  "lng" : 2.2898664
               }
            }
         },
         "place_id" : "ChIJWWRTZChw5kcRYFHY4caCCxw",
         "types" : [ "postal_code" ]
      }
   ],
   "status" : "OK"
}

image

1 Like

execution error:
Select list item: Attempt to get item number 3 of a list of length 0: ()
Note: You will not see another error reported for 5 seconds.

Do you have another method? please

either you didnt parse the json or may be something wrong…

oh hoooo try like this
I missed it

image

share the json as a text file here or use this <> the json response… we will look at it…

{
   "plus_code" : {
      "compound_code" : "V75V+9Q5 París, Francia",
      "global_code" : "8FW4V75V+9Q5"
   },
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "75007",
               "short_name" : "75007",
               "types" : [ "postal_code" ]
            },
            {
               "long_name" : "París",
               "short_name" : "París",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "París",
               "short_name" : "París",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "Isla de Francia",
               "short_name" : "IDF",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "Francia",
               "short_name" : "FR",
               "types" : [ "country", "political" ]
            }
         ],
         "formatted_address" : "75007 París, Francia",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 48.8637587,
                  "lng" : 2.3332731
               },
               "southwest" : {
                  "lat" : 48.845927,
                  "lng" : 2.2898664
               }
            },
            "location" : {
               "lat" : 48.85433450000001,
               "lng" : 2.3134029
            },
            "location_type" : "APPROXIMATE",
            "viewport" : {
               "northeast" : {
                  "lat" : 48.8637587,
                  "lng" : 2.3332731
               },
               "southwest" : {
                  "lat" : 48.845927,
                  "lng" : 2.2898664
               }
            }
         },
         "place_id" : "ChIJWWRTZChw5kcRYFHY4caCCxw",
         "types" : [ "postal_code" ]
      }
   ],
   "status" : "OK"
}

thats why we always ask to share us full json inorder to hepl/suggest better
@jimy_jonayker

if you want to know the structure of dictionary just paste the json over here

1 Like

Thank you very much for sharing your knowledge with me.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.