Answer the question
In order to leave comments, you need to log in
How to parse this json?
json itself json link
with this code brought out what is in "def" , but I need it in "tr" I can't get it how to do it?
public void getJson() throws Exception {
String post_id = null;
JSONObject obj = new JSONObject(getJsonN());
JSONArray phoneNumbersArr = (JSONArray) obj.get("def");
for (int i = 0; i < phoneNumbersArr.length(); i++) {
post_id = phoneNumbersArr.getJSONObject(i).getString("text");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question