Chris,
I am happy to help. See the example below. JSON is simply form of a javascript array so you can use javascript array syntax to access it. I did notice a problem however. The JSON is not being generated properly to form an array structure. Each value of the Address array must be quoted separately and separated by comas. This is corrected in the example below. This example simply takes the JSON you sent (corrected) and loads a textarea control whose id is ‘display’ on my ZEN page.
ClientMethod LoadText() [
Language = javascript ]
{
var json
= {
"FileId":"HIL",
"Name":"HILTON HOTEL HYDE PARK",
"Address":["101 HYDE PARK ROAD","HYDE PARK","WEST
LONDON,LONDON,UK,"],
"PostCode":"SW1 1ZU"
};
zen("display").setValue(json.Address[1]
+ "\n" + json.Address[2]);
}
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
InterSystems-...@googlegroups.com.
To post to this group, send email to
InterSy...@googlegroups.com.
Visit this group at http://groups.google.com/group/InterSystems-MV.
For more options, visit https://groups.google.com/groups/opt_out.