I am using the com.jayway.restassured.response.Response class to read the response from the API. Its in the following format. Is there a way I can access the value of layout or regions using the keyname. For example - response.layout or response.regions? I tried using the JSONSlurper but that didnt work with the Response class. Any help is greatly appreciated.
JSON Response :
{
layouts:
[
regions:
[
[
metadata:null,
endDate:null,
displayName:null,
roles:[], type:100,
widgets:[],
structure:100,
repositoryId:headerRegionHomePage,
name:header,
width:12,
audiences:[],
startDate:null,
height:300
],
[
structure:100,
type:101,
widgets:[],
width:12
],
[
metadata:null,
endDate:null,
displayName:null,
roles:[],
type:102,
widgets:[],
structure:100,
repositoryId:footerRegionHomePage,
name:footer,
width:12,
audiences:[],
startDate:null,
height:300
]
],
]
}