I'm trying to read the data from a dynamic object using Json.Net, i'm getting the json string using the webclient.downloadString.
{
"player1": {
"id": 21426685,
"name": "player1",
"profileIconId": 508,
"revisionDate": 1436353103000,
"Level": 30
},
"Player2": {
"id": 27864632,
"name": "player2",
"profileIconId": 508,
"revisionDate": 1436444512000,
"Level": 30
}
}
Each time the property name (player) will be different depending on the api call. I can deserialize the json string using Json.net and get the name of each property but i can't figure out how to get the data of each property since it won't have a constant name
Dim jsonobj As Object = JsonConvert.DeserializeObject(ChampionsReply)
For Each p As JProperty In jsonobj
ListBox1.Items.Add(p.Name)
Next
Anyone could point me a way to make it work?