I have a property on a WebContainer set as a JSONItem type and I want to change the values of one of the item’s children. How would I go about doing so?
The JSONItem:
"Mailing":{
"Address1":"",
"Address2":"",
"City":"",
"State":"",
"PostalCode":""
},
"Physical":{
"Address1":"",
"Address2":"",
"City":"",
"State":"",
"PostalCode":""
}
}
I want to update the values of the “Physical” child node. I may be going at this the wrong way but here is what I have. I’m stuck on the line assigning the jNewAddress item to the existing “Physical” child node.
[code] Try
Dim jNewAddress As new JSONItem
jNewAddress.Value("Address1") = txtAddress1.Text
jNewAddress.Value("Address2") = txtAddress2.Text
jNewAddress.Value("City") = txtCity.Text
jNewAddress.Value("State") = txtState.Text
jNewAddress.Value("PostalCode") = txtZip.Text
jAddress.Child("Physical", Assigns jNewAddress As JSONItem) <<<< Syntax error
Return True
Exception err As JSONException
end Try[/code]