B4X:
Sub GetAllSetup
'clear content
setup.SetData("records", "")
Dim dbMySQLE As BANanoMySQLE
dbMySQLE.Initialize("test", "setup_standard", "id_setup", "id_setup")
dbMySQLE.SelectDistinctAll(Array("codice"), Array("codice"))
dbMySQLE.JSON = banano.CallInlinePHPWait(dbMySQLE.MethodName, dbMySQLE.Build)
dbMySQLE.FromJSON
Select Case dbMySQLE.OK
Case False
Dim strError As String = dbMySQLE.Error
vuetify.ShowSnackBarError("An error took place whilst running the command. " & strError)
Return
Case Else
vuetify.ShowSnackBarSuccess("Query corretta")
End Select
'convert to json
Dim jsonSetup As String = banano.ToJson(dbMySQLE.result)
mappaDeiSetup = banano.ToJson(dbMySQLE.result)
setup.SetData("records", jsonSetup)
End Sub
how could I put in a Vue List?
this is the result of jsonSetup: [{"codice":"custom_1"},{"codice":"custom_2"},{"codice":"custom_3"},{"codice":"custom_4"},{"codice":"custom_5"},{"codice":"default_1"},{"codice":"default_10"},{"codice":"default_2"},{"codice":"default_3"},{"codice":"default_4"},{"codice":"default_5"},{"codice":"default_6"},{"codice":"default_7"},{"codice":"default_8"},{"codice":"default_9"}]
i want something like this for all elements of jsonSetup as Map
B4X:
list6.ClearItems
list6.AddItemParentChild("", "1", "mdi-ticket", "red", "Attractions", "")
list6.AddItemParentChild("1", "c1", "", "", "List Item", "")
how could i make it in a iterable cycle?
Last edited: