I have getting response following json format. I need to message value only. how to segregate the message value. can you please help me.
{status:"1", message:"cu34343"}
I have getting response following json format. I need to message value only. how to segregate the message value. can you please help me.
{status:"1", message:"cu34343"}
if response as object
val jsonObject = JSONTokener(response).nextValue() as JSONObject
val message = jsonObject.getString("message")// Before That check null or
not
Log.i("message: ", message)
also refer different response using gson and response model class converter.