@Myxlplyx - So to solve your problem.
- In the test script of your GET request, you can put this down:
let response = pm.response.json(),
savedData = JSON.stringify(response);
pm.environment.set("savedData", savedData);
You need to store the data in stringified format.
- In the body of the requests where you want to use this savedData you can simply put it like so:
Make the body as ‘Raw’ and the type as ‘JSON’:
Put the following as the raw data:
{
"myData": [{{savedData}}]
}
Run the request and you can see the following in the Postman Console
Edit: FYI you can now try that yourself by forking the following collection
https://www.postman.com/postman/workspace/postman-answers/collection/9215231-47464531-0c3f-4b21-94b8-71e48025f88f?ctx=documentation