i have some problem with the Json extension.
i need to compare the name that i select in my list picker with a string in Jons file that i uploaded to my server. link: http://nouvatecnologia.altervista.org/stazioni.json.
if i change manually the index of the Object it’ll work percetly but i need that it change automatically then i think to use a for Cycle.
here the problem, the index don’t change(then the if don’t work) , the result is always same, the name of the index object 1.
what am i wrong?
You are using for loop.
So every time it will reset value of variable to empty.
And everytime it will set value to item.And if that value is equal to global variable then if condition will run.
Are you sure that you are getting that text in json text?
I tried with and without the variable “Global name” in the for loop but nothing change.
I try Also a " cycle" with if, everytime that i Press the Button i increase the variable " index" and all work perfecty, then i think that the file Is okay, am i wrong?
Anyway The file at the origins had a .geojson extension and with an online convertitor i convert to .JSON.
I upload the link of the file if you would like to Watch.
Is There another way to do a compare from the string?
Try this. One option may be to store the “NOME” variabe of your JSON in a list.
it works very well, Thanks a lot
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.