Hello everyone,
I have read the post in https://www.b4x.com/android/forum/threads/android-json-tutorial.6923/
The post how how to get the element in the json, however, if I need to find some element within several array and object, how can I do so?
Above json is what I receive in google map geocode api, actually we may want to use the date at:
"geometry"-->"location"--> both "lat" and "lng". But I don't know to get those elements with map and list function. Please help. Thank you.
Alpha
I have read the post in https://www.b4x.com/android/forum/threads/android-json-tutorial.6923/
The post how how to get the element in the json, however, if I need to find some element within several array and object, how can I do so?
B4X:
{
"results" : [
{
"address_components" : [
{
"long_name" : "香港",
"short_name" : "HK",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "香港",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 22.561968,
"lng" : 114.4069573
},
"southwest" : {
"lat" : 22.1533884,
"lng" : 113.835078
}
},
"location" : {
"lat" : 22.396428,
"lng" : 114.109497
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 22.561968,
"lng" : 114.4069573
},
"southwest" : {
"lat" : 22.1533884,
"lng" : 113.835079
}
}
},
"place_id" : "ChIJD5gyo-3iAzQRfMnq27qzivA",
"types" : [ "country", "political" ]
}
],
"status" : "OK"
}
Above json is what I receive in google map geocode api, actually we may want to use the date at:
"geometry"-->"location"--> both "lat" and "lng". But I don't know to get those elements with map and list function. Please help. Thank you.
Alpha