HI
how can i know how many results have on my json
for exemple
i make this query to return me all citys
ok this show me
[{"Cidade":"S\u00e3o Leopoldo"},{"Cidade":"Porto Alegre"},{"Cidade":"Canoas"},{"Cidade":"Novo Hamburgo"}]
i try make this to take the values
OK i know return a value 0 1 2 3 4
but have a way to make this count automatic?
I dont want update my app all time
when i add a new city on the database automatic this add on my spinner
for exemple
i m add a new city on the table database
how can i get this all values to put on a spinner
how can i know all values to make a Get(0) Get(1) etc
if i have 40 citys on my db have a way to take this 40 citys to put on my spinner?
spinnercidade.AddAll(Array As String(nomecompleto,nomecompleto2)
how can i know how many results have on my json
for exemple
i make this query to return me all citys
B4X:
Sub verificausuario
ExecuteRemoteQuery("SELECT Cidade FROM cidades" , resultadocidades)
End Sub
ok this show me
[{"Cidade":"S\u00e3o Leopoldo"},{"Cidade":"Porto Alegre"},{"Cidade":"Canoas"},{"Cidade":"Novo Hamburgo"}]
i try make this to take the values
B4X:
Dim listaface As List
Dim nomecompleto As String
Dim parserface As JSONParser
Dim mface As Map
mface.Initialize
parserface.Initialize(respostadoservidor)
listaface.Initialize
listaface = parserface.NextArray
mface = listaface.Get(0)
nomecompleto = mface.Get("Cidade") 'THIS SHOW ME SÃO LEOPOLDO 1°
Msgbox(nomecompleto, "teste") '
mface = listaface.Get(1)
nomecompleto2 = mface.Get("Cidade") 'THIS SHOW ME PORTO ALEGRE 2°
Msgbox(nomecompleto, "teste")
OK i know return a value 0 1 2 3 4
but have a way to make this count automatic?
I dont want update my app all time
when i add a new city on the database automatic this add on my spinner
for exemple
i m add a new city on the table database
how can i get this all values to put on a spinner
how can i know all values to make a Get(0) Get(1) etc
if i have 40 citys on my db have a way to take this 40 citys to put on my spinner?
spinnercidade.AddAll(Array As String(nomecompleto,nomecompleto2)