I am getting data from a web service. This is no problem. The returned JSON data is, say, as follows.
[
{
"jsonrpc":"2.0",
"result":[
{
"playerData":{
"number":"7",
"name":"Ronaldo"
},
"teamName":"Real Madrid"
},
{
"playerData":{
"number":"10",
"name":"Messi"
},
"teamName":"Barcelona"
}
],
"id":1
}
]
I am then deserializing it with the following line.
Expand|Select|Wrap|Line Numbers
- Dim playerresp = JsonConvert.DeserializeObject(Of Result)(responseFromServer)
I know that what I need is like playerresp.playerData.name etc
But how do I loop through the players listed? Ie, so I can write them as
Real Madrid: Ronaldo (7)
Barcelona: Messi (10)
This is no doubt fairly straightforward but I'm struggling with the simple part having done the hard part....