The JSONObject class / util.JSONObject methods |
Returns the value corresponding to the specified entry name.
util.JSONObject.get( name STRING ) RETURNING result result-type
The get() method returns the value or JSON object corresponding to the element name passed as parameter.
If the element identified by the name is a simple value, the method returns a string. If the element is structured, the method returns a util.JSONObject instance and the returned object must be assigned to a program variable defined with the util.JSONObject type. If the element is a list of values, the method a util.JSONArray instance and the returned object must be assigned to a program variable defined with the util.JSONArray type.
A name/value pair can be set with the put() method.
IMPORT util MAIN DEFINE obj util.JSONObject LET obj = util.JSONObject.create() CALL obj.put("address", "5 Brando Street") DISPLAY obj.get("address") END MAIN