mapping and looping dynamic response value

Hi, I have a case to mapping document to dynamic response (in json format) and then looping it. For example:

{
“paths”: {
“/”: {
“get”: {
“summary”: “GET”,
“description”: “”,
“operationId”: “”,
“produces”: [
“application/json”
],
“responses”: {},
“scopes”: [“scoperead”],
“enabled”: true
},
“put”: {
“summary”: “PUT”,
“description”: “”,
“operationId”: “”,
“produces”: [
“application/json”
],
“responses”: {},
“scopes”: [“scopewrite”],
“enabled”: true
},
“enabled”: true
},
“/responseBad”: {
“put”: {
“description”: “Bad Bad”,
“consumes”: [],
“responses”: {},
“enabled”: true
},
“post”: {
“description”: “Bad Bad”,
“consumes”: [],
“responses”: {},
“enabled”: true
},
“parameters”: [],
“enabled”: true
},
“/responseGood”: {
“get”: {
“summary”: “GET”,
“description”: “”,
“operationId”: “”,
“produces”: [
“application/json”
],
“responses”: {},
“scopes”: [“scoperead”],
“enabled”: true
},
“post”: {
“consumes”: [],
“responses”: {},
“enabled”: true
},
“parameters”: [],
“enabled”: true
}
}
}

from above sample, I need to mapping this response value (dynamic response) to document and looping from the “/” or “responseBad” (the operation name is dynamic) then “get” or “put” then cek the value of “summary” if “GET” then add a new node “scopes”: [“scoperead”] if “PUT” then add new node “scopes”: [“scopewrite”]. How can I implement this?

Thanks