i have problem. i want to get only id 2. who know tell me please...
{
"results": [
{
"id": 1,
"name": "Test"
},
{
"id": 2,
"name": "Beispiel"
},
{
"id": 3,
"name": "Sample"
}
]
}
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As Map = parser.NextObject
Dim results As List = root.Get("results")
For Each colresults As Map In results
Dim name As String = colresults.Get("name")
Dim id As Int = colresults.Get("id")
Next
If you want to get the second items. add a counter to the loop and remember the value you want.
Dim parser As JSONParser
parser.Initialize(<text>)
Dim root As Map = parser.NextObject
Dim results As List = root.Get("results")
For Each colresults As Map In results
Dim name As String = colresults.Get("name")
Dim id As Int = colresults.Get("id")
Next
If you want to get the second items. add a counter to the loop and remember the value you want.