I need help accessing the response of my POST request in Postman using a Pre-request Script.
Script below :
var mobiles = postman.environment.get("mobiles");
if (!mobiles)
{
mobiles =["8824444866","8058506668"];
}
var currentMobile = mobiles.shift();
postman.environement.set("mobile","currentMobile");
postman.environement.set("mobiles",mobiles);
When I try to send the request, an error pops up in Postman with the following message:
There was an error in evaluating the Pre-request Script: Cannot read property 'get' of undefined.
I'm looking for any suggestions or solutions to resolve this issue. Thanks!