After receiving the following output from Postman or hitting an endpoint, the challenge is to extract "id" and "name" from the values. The key-value pairs are nested within sub-blocks, so how can this be achieved using JavaScript and then implemented in the "Tests" tab of Postman?
{
"SearchResult": {
"total": 11,
"resources": [
{
"id": "12345",
"name": "GuestType",
"description": "Identity group ",
},
{
"id": "56789",
"name": "Admin",
"description": "",
},
]
}
}