I'm trying to retrieve the value from the response body of an API call which looks like this
Response ==> {"result":"7decbf2a870ec5108df1ebd73cbb3525"}
I would only need "7decbf2a870ec5108df1ebd73cbb3525".
I was trying to use String.valueOf(response). I ended up getting something like this
[[Ljava.lang.String;@7defb4fb].
snippet try { String resp = (APIUtils.callPostAPI(instanceDetails, apiPath, HEADERS, queryParam, payload, displayValue)); if (!resp.isEmpty()) { String val = String.valueOf(resp); System.out.println("value is " + val.toString()); return val; } else { return null; }
Thanks in Advance.