LucasMs. ( Thanks Your response could not have been any faster
)
This is the code I am working with:
Dim parser As JSONParser
parser.Initialize(str)
Dim root As Map = parser.NextObject
Dim myList As List = root.Get("myList")
Dim resSize As Int = myList.size
Dim id(resSize),vote_count(resSize) As Int
Dim vote_average(resSize) As Double
Dim title(resSize), release_date(resSize), original_title(resSize),video(resSize) As String
Dim c As Int = 0
For Each colresults As Map In myList
id(c) = colresults.Get("id")
title(c) = colresults.Get("title")
vote_average(c) = colresults.Get("vote_average")
release_date(c) = colresults.Get("release_date")
original_title(c) = colresults.Get("original_title")
vote_count(c) = colresults.Get("vote_count")
video(c) = colresults.Get("video")
c = c + 1
Next
For a = 0 To myList.Size -1
Log("record: " & a)
Log (id(a))
Log (title(a))
Log (vote_average(a))
Log (release_date(a))
Log (original_title(a))
Log (vote_count(a))
Log (video(a))
Log("-----------------------" & CRLF)
Next
Log(id(a) will retrieve ALL the IDS.
But let's say I want ONLY id 4 not knowing if id 4 exists will throw error outofbounds. That's my problem.
How do I retrieve each id(1), id(2) etc... individually without knowing what the last Id is and running into the outofbound error?