Postman Save Environment Variable After Request - gecko-8/devwiki GitHub Wiki

Up

Add the following to the Tests tab of the request:

var jsonData = JSON.parse(responseBody);
pm.environment.set("<env variable name>", jsonData.<property to save>);