Привет всем, я пытаюсь получить значения в F_TableOtherFamily->F_Table и зацикливаюсь, чтобы получить имя и значения того, что внутри этого, но я не могу сделать это, используя следующий код:
For Each msg As JObject In json1("entry")
Dim results As List(Of JToken) = msg("content")(formName).ToList()
For Each pair As JProperty In results
pair.CreateReader()
If pair.Descendants.Count > 1 Then
'has more values (like in a TABLE)
For Each child In pair
'not sure how to get other values
Next
Else
'It only has one value
Debug.Print(pair.Name)
Debug.Print(pair.Value.ToString)
End If
Next
Next
Значение json для msg:
{
"content": {
"@type": "application/xml",
"F_Form1": {
"@uid": "fb1ad4ec",
"F_TableOtherFamily": {
"F_Table": {
"F_OtherFamilyName": "BLANK1",
"F_OtherFamilyID": "BLANK2",
"F_OtherFamilyRelation": "BLANK3"
}
},
"F_ReceivedYorN": "Y",
"F_ContractNumber": "901841586"
}
},
"link": [
{
"@href": "../../../../../secure/org/data/c76df8888ada/F_Form1/fb1ad4ec",
"@rel": "edit"
}
]
}
Значение для child:
{
"F_Table": {
"F_OtherFamilyName": "BLANK1",
"F_OtherFamilyID": "BLANK2",
"F_OtherFamilyRelation": "BLANK3"
},
"F_Table": {
"F_OtherFamilyName": "BLANK1-1",
"F_OtherFamilyID": "BLANK2-2",
"F_OtherFamilyRelation": "BLANK3-3"
}
}
Я не уверен, как зациклиться, чтобы получить значения внутри F_Table??