| The JSONArray class / util.JSONArray methods | |
Returns the number of elements in the JSON array object.
util.JSONArray.getLength() RETURNING length INTEGER
The getLength() method returns the number of elements in the JSON array object.
This method can be used in conjunction with the get() and getType() method to read elements of a JSON array object.
IMPORT util
MAIN
DEFINE arr util.JSONArray
DEFINE i INTEGER
LET arr = util.JSONArray.parse('[123,8723,9232]')
FOR i=1 TO arr.getLength()
DISPLAY i, ": ", arr.get(i)
END FOR
END MAIN