Reputation: 3800
I've got following object structure from a JSON deserialization. Then, I can access properly to its values, but how can I get the length of an Object
array using a specific key?
I need to get length shown in the picture like jsonDes("result").length
.
Upvotes: 0
Views: 1640
Reputation: 1039248
The following will just print the expected result using VB.NET dynamic features:
Dim jsonDes As Object = New JavaScriptSerializer().DeserializeObject(...)
Dim length As Integer = jsonDes("result").length
Console.WriteLine(length)
Upvotes: 1