Reference+
Name
setJSONArray()
Class
JSONArray
Description
Sets the value of the JSONArray with the associated index value.
Examples
- JSONArray json; void setup() { json = new JSONArray(); for (int i = 0; i < 3; i++) { JSONArray values = new JSONArray(); values.setInt(0, i); values.setInt(1, i); values.setInt(2, i); json.setJSONArray(i, values); } println(json); } // Sketch prints: //[ // [ // 0, // 0, // 0 // ], // [ // 1, // 1, // 1 // ], // [ // 2, // 2, // 2 // ] //]
Syntax
- .setJSONArray(index, value)
Parameters
- index- (int)the index value to target
- value- (JSONArray)the value to assign
Return
- JSONArray

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.