As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
json {"a": [{"b": "c"}, {"d": "e"}]} test TypeError: Cannot find default value for object. test.a [{"b": "c"}, {"d": "e"}] test.a.length test.a.size function size() {/* int size() */} test.a.get function get() {/* java.lang.Object get(int) */} test.a[0] Java class "org.json.simple.JSONArray" has no public instance field or method named "0". test.a.get(0) null test.a.getJSONObject(0) TypeError: Cannot find function getJSONObject.
var json = {"a": [{"b": "c"}, {"d": "e"}]}; for each (aArray in json.a) { if(typeof aArray.b != "undefined") { b_value = aArray.b; } if(typeof aArray.d != "undefined") { d_value = aArray.d; } }