Hey all I am trying to get the values in F_TableOtherFamily->F_Table and loop to get the name and values of whats inside that but I can not seem to do that with using the following code:
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
The json value for msg is:
{
"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"
}
]
}
The value for child is:
{
"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"
}
}
I am not sure how to go about looping to get the values inside F_Table??