i have the below json that i want to pass to autocomplete edit text
i added a list after "description" above so that i can keep the descriptions in a list and later add the list to autocomplete edit text in textchanged event. However, the list returned is always empty. What am i doing wrong?
B4X:
Dim parser As JSONParser
parser.Initialize(JobString)
Dim root As Map = parser.NextObject
Dim predictions As List = root.Get("predictions")
For Each colpredictions As Map In predictions
Dim reference As String = colpredictions.Get("reference")
Dim types As List = colpredictions.Get("types")
For Each coltypes As String In types
Next
Dim matched_substrings As List = colpredictions.Get("matched_substrings")
For Each colmatched_substrings As Map In matched_substrings
Dim offset As Int = colmatched_substrings.Get("offset")
Dim length As Int = colmatched_substrings.Get("length")
Next
Dim terms As List = colpredictions.Get("terms")
For Each colterms As Map In terms
Dim offset As Int = colterms.Get("offset")
Dim value As String = colterms.Get("value")
Next
Dim structured_formatting As Map = colpredictions.Get("structured_formatting")
Dim main_text_matched_substrings As List = structured_formatting.Get("main_text_matched_substrings")
For Each colmain_text_matched_substrings As Map In main_text_matched_substrings
Dim offset As Int = colmain_text_matched_substrings.Get("offset")
Dim length As Int = colmain_text_matched_substrings.Get("length")
Next
Dim secondary_text As String = structured_formatting.Get("secondary_text")
Dim main_text As String = structured_formatting.Get("main_text")
Dim description As String = colpredictions.Get("description")
Dim id As String = colpredictions.Get("id")
Dim place_id As String = colpredictions.Get("place_id")
Next
Dim status As String = root.Get("status")
i added a list after "description" above so that i can keep the descriptions in a list and later add the list to autocomplete edit text in textchanged event. However, the list returned is always empty. What am i doing wrong?