0

I am getting resposne from web service :-

response = [{"result":"false"}]

I am not getting How to Parse this

Thanks Advance.

3

1 Answer 1

2
JSONObjet obj = response.getJSONObject(0);
String result = obj.getString("result");

this should do the trick.
if you're trying to parse more than on object you can use a for-loop and if you're not sure if you have a field, you can use this line:

if(obj.has("result"){
    String result = obj.getString("result");
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.