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.
Asked
Active
Viewed 1.0k times
6

n-verbitsky
- 552
- 2
- 9
- 20

icube
- 2,578
- 1
- 30
- 63
1 Answers
12
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.

Dinesh Kumar
- 1,694
- 15
- 22