In reference to JSON Array iteration in Android/Java, when I have a single array
[{json object},{json object},{json object}]
I could easily create a JSONArray from the string as below.
int id;
String name;
JSONArray array = new JSONArray(string_of_json_array);
for (int i = 0; i < array.length(); i++) {
JSONObject row = array.getJSONObject(i);
id = row.getInt("id");
name = row.getString("name");
}
However, if I have JSON String of multiple array
[{json object},{json object},{json object}]
[{json object},{json object},{json object}]
[{json object},{json object},{json object}]
Can I still fit into a single JSONArray (i.e. making it JSONArray of JSONArray)? If not, how could I split them into multiple JSONArray (one for each of the row above)?
Thank you.