Hi I have a JSON Object contains data Like
{"THIRD":"OK","SECOND":"OK","FIRST":"OK"}
{"THIRD":"OK","SECOND":"NULL","FIRST":"OK"}
{"THIRD":"OK","SECOND":"OK","FIRST":"OK"}
When I tried to add this JSON object to JSON array it is only taking last one in JSON Object({"THIRD":"OK","SECOND":"OK","FIRST":"OK"}).Can any one help me in solving this.
I am using it like
JSONObject object = new JSONObject();
JSONArray array = new JSONArray();
array.add(object);(Only adding last element in JSON Object)
Instead of taking all values in the JSON Object Json Array is only taking last value in JSON Object.