title: How to Set Variable from Request in Postman
body: <p>I am trying to write some tests for Postman. Many of the requests require an API key that gets returned by an initial GET request.</p>
  
  <p>To set something hard-coded that is not dynamic, it looks like the test code is of the form</p>
  
  <pre><code>let variable = pm.iterationData.get("variable");
  console.log("Variable will be set to", variable);
  </code></pre>
  
  <p>How do I set a return value as a global variable and then set that as a header parameter?</p>