Save jsonData.id to txt or csv file

Hello everyone!
How can I save the result to a CSV file

  1. Parse the answer.
const jsonData = pm.response.json();
  1. To output the result ID, I write like this:
pm.test("ID: " + jsonData.id, function () { });
  1. To save the ID to global variables, I write as follows:
pm.global.set("ID", jsonData.id);
  1. To output the ID to the console, I write like this:
console.log("ID: " + jsonData.id);

But how to save jsonData.id to a file (txt or csv)?

Hey @berson :wave:t2:

There isn’t any functionality in the platform to write data to a file on your file system.

There are a few other workarounds that can be done here but those might involve creating a mini server to post the data or using Newman to create that file after a Collection run.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.