The response from my API is
{
"new": {
"new1": "value1",
"new2": "value2"
}
}
When I try to get what is there in jsonPath of "new" using
response.jsonPath().getJsonObject("new").toString()
The above query returns something like below, which is kind of a map
"new1"="value1","new2"="value2"
The response what I look for is,
{
"new1": "value1",
"new2": "value2"
}
Tried many other ways as well , but it returns a map only