util.JSONArray class is used to modify and manipulate ordered lists of values following the JSON string syntax.
JSON array is an ordered list of value pairs. JSON arrays are enclosed in square brackets - [ to begin the array and ] to end it. Values are separated by , (comma):
[234,3456,24656,34561]
[a, ab, abc, aa, aabb, aabbcc]
JSON arrays are created by the util.JSONArray.create() method.
Once created, JSON arrays can be studied and manipulated by util.JSONObject methods summarized in the table below.
method |
description and examples |
creates a new JSON array
|
|
creates a new JSON array from a DYNAMIC ARRAY
|
|
parses a JSON string into a new JSON array
|
|
returns a value of a member of the JSON array
|
|
returns the number of the members included in the specified JSON array
|
|
returns the type of the member of the specified JSON array
|
|
adds a new member to the specified JSON array
|
|
removes the specified member from the JSON array
|
|
fills a DYNAMIC ARRAY with the elements of the JSON array
|
|
produces a JSON string from the values included in the JSON array
|