Hi,
I’m new in postman and trying to log the received status code for 1000 ids in various format so that my tests can dispayed the amount of ids received 200 status, 400 bad request status and 500 internal server error.
I tried below things but it didn’t work for me
var jsonData = pm.response.json();
var myvar = Object.responseCode(jsonData)[0]
switch(myvar)
{
case "200":
console.log("The status code 200");
break;
case "400":
console.log("The status code 400")
break;
case "500":
console.log("The status code 500")
}