Skip to content

Postman Save Environment Variable After Request

Jason Lewis edited this page Sep 18, 2023 · 1 revision

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>);
Clone this wiki locally