Hello everyone.
When I do a GET request on an endpoint, I have some code in my “Tests” tab that does the following:
var response = pm.response.json();
response.terms = “accept”;
response.date = new Date().getDate();
var jsonBody = JSON.stringify(response);
pm.environment.set(“nextPutVar”, jsonBody);
This successfully captures the entire received JSON payload and stores it as an environment variable. My Postman runner then goes to a PUT request, where I want to insert the entire JSON object from the previous GET into the body of the PUT. Any ideas on how I could do this?