util.JSONArray class is used to modify and manipulate ordered lists of values according to the syntax of JSON string.
JSON array is an ordered list of value pairs:
[234,3456,24656,34561]
[a, ab, abc, aa, aabb, aabbcc]
JSON arrays are enclosed in square brackets - [ to begin the array and ] to end it. Values are separated by , (comma):
JSON arrays are created by util.JSONArray.create().
Once created, JSON arrays can be studied and manipulated by util.JSONObject methods summarized in this table.
creates a new JSON array |
|
removes JSON array elements and sets JSON array length to 0 |
|
deletes the specified member from the JSON array, or a range of members if two indexes are specified as parameters. These indexes denote the range to delete. |
|
creates a new JSON array from a DYNAMIC ARRAY |
|
returns a value of a member of the JSON array |
|
returns the number of the members included in the JSON array |
|
returns a length of the JSON array |
|
returns the type of the member of the JSON array |
|
removes the specified element from the JSON array |
|
parses a JSON string into a new JSON array |
|
adds a new member to the specified JSON array |
|
takes the index of the element of JSON array (a key-value pair) as the parameter, and deletes this element |
|
fills a DYNAMIC ARRAY with the elements of the JSON array |
|
produces a JSON string from the values included in the JSON array |