Hey all I have the following code:
try {
foreach (var x1 in JObject.Parse(json1)) {
string name = x1.Key;
JToken value = x1.Value;
There are no visible errors with the above code. However, once I run the application and it gets to that point it errors and says:
'Newtonsoft.Json.Linq.JProperty' does not contain a definition for 'Key'
So whats going on here. My VB.net code works like the above:
Try
For Each x1 In JObject.Parse(json1)
Dim name As String = x1.Key
Dim value As JToken = x1.Value
dynamic), but I believe the property you're looking for is actuallyName.