-1

I am sending a JSON data to server and the server returning a data as JSON. How can I save the returning data as JSONArray? The returning value is in 'responce' variable, How can I save this response as JSONArray. I need to use the returning JSONArray to update my db.

This is my JSON,

[{
    "_id": "1",
    "name": "Sss",
    "dob": "10/1/2000",
    "gender": "Male",
    "mobile": "123456780",
    "address": "asdas"
}]
K Neeraj Lal
  • 6,768
  • 3
  • 24
  • 33
Sebastian
  • 417
  • 3
  • 13

1 Answers1

1
JSONArray jsonArray = new JSONArray();
jsonArray.put(responce); //don't blame for typo of responce
Sunil B N
  • 4,159
  • 1
  • 31
  • 52