I have this JSON:
How can i get number and value of each item? I need this to put in my ListView line of apk that i im building...so i tried like this:
I don't know using Get(i) how to get index and index value to print using log..so that i can later add it to listview item...so if you could help me what i need to write...thanks.
B4X:
{
"storage": [
["1", "AA"],
["2", "BB"],
["3", "CC"],
["4", "DD"],
["5", "EE"],
["6", "FF"],
["7", "GG"],
["8", "HH"],
["9", "II"],
["10", "JJ"],
["11", "KK"],
["12", "LL"],
["13", "MM"],
["14", "NN"],
["15", "OO"],
["16", "RR"]
]
}
How can i get number and value of each item? I need this to put in my ListView line of apk that i im building...so i tried like this:
B4X:
'INITIALIZE - json
JSON.Initialize(Job.GetString2("UTF8"))
'NEXT - Object
Map1 = JSON.NextObject
'GET - VideoClub Items
VideoClubItems = Map1.Get("storage")
For i = 0 To VideoClubItems.Size - 1
Log(VideoClubItems.Get(i)) => Need to get index in this example => 1
Log(VideoClubItems.Get(i)) => Need to get index value in this example => AA
Next
I don't know using Get(i) how to get index and index value to print using log..so that i can later add it to listview item...so if you could help me what i need to write...thanks.