Extension packages / The util package |
The util.JSONArray class provides methods to handle an array of values, following the JSON string syntax.
IMPORT util
[123,546,"abc","def","xyz"]
A JSONArray object must be created before usage with one of the class methods like util.JSONArray.create().
The JSONArray class provides methods for accessing, adding/replacing or deleting the array values by index with the get(), put() and remove() methods.
If the structure of the JSON array is not known at compile time, you can introspect the elements of the array with the getLength() and getType() methods.