Summary
Postman has environment variables, convenient for things like JWT keys. This script takes response data and saves the JWT value.
Code
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable('token', jsonData.data.JWT);
Postman has environment variables, convenient for things like JWT keys. This script takes response data and saves the JWT value.
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable('token', jsonData.data.JWT);