Android Question Error in extract json

Fabrice La

Active Member
Licensed User
Longtime User
My code :
B4X:
Dim job As HttpJob
    job.Initialize ("", Me)
    job.Download("https://world.openfoodfacts.org/api/v0/product/" & codebar & ".json")
    Wait For (job) JobDone(job As HttpJob)
    If job.Success Then
        Log("Job success")
        Dim parser As JSONParser
        parser.Initialize(job.GetString)
        Dim root As Map = parser.NextObject
        Dim status_verbose As String = root.Get("status_verbose")
        Dim result As List = root.Get("product")
        For Each colresult As Map In result
        Dim product_name As Double = colresult.Get("product_name")
        Next

the error in "For Each colresult As Map In result"

I have the same code in B4J without error
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…