I tried using the postman.setEnvironmentVariable()
method in which I can set simple numbers and string values. My question is when I tried saving an object, it saves as [object Object]
. I want to know if it is possible to save a JSON object so I can use it in another Request.
To set up Postman environment variables: In the top right corner of Postman, click the environment selector and select Manage environments. Click Add to add a new environment where you'll define your OneLogin environment variables. Note: You'll need to use your API credentials to generate the access_token value.
You should use JSON.stringify() before setting it to environment variable.
Then after you call it in next request, use JSON.parse() to recreate the object.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With