I have json and i want to store them 2D array.
This is my json
[
{
"IsStudent":true,
"Name":"Ali",
"age":16,
"ID":1
},
{
"IsStudent":false,
"Name":"Emad",
"age":17,
"ID":2
}
]
so I want to store all the information to 2D array :
array[0][0] = true
array[0][1] = Ali
array[0][2] = 16
array[0][3] = 1
and so on..
I tried alot to get those values by using split and join but it doesn't work for me
JSONArray jarr2 = new JSONArray("my json is here");
String[] resultingArray = jarr.join("\":").split(",\"");
System.out.println(resultingArray[3]);