i have a json response like this:
[{“id":135583909,“from”:"[email protected]”,“subject”:“Verify your email address to complete your Account registration.”,“date”:“2023-01-21 21 :30:20”}]
when i sent the request, the value was successfully entered into the variable. with this test code:
response = pm. response. json()[0].id;
console. log(response);
pm. environment. set(“idemail”, response);
but when i run collection i get error like this:
TypeError: Cannot read properties of undefined (reading ‘id’)
How do I fix this, I’ve tried it but it still doesn’t work. please help me solve this.