here goes the first JSON object to string output
{
"session_id" : "zzz00001111",
"name" : "Administrator",
}
but when I call,
response.remove("session_id");
response.append("session_id","abc12345678") ;
it becomes the following.
{
"session_id" : [
"abc12345678"
],
"name" : "Administrator",
}
But i do not need to change the style of the JSON, i just need to chnage the value of the session_id. Any idea how to do it. I tired append it did not work.
Try the following
response.put(“session_id”,”session-id”)