title: How to set environment variable in postman collection runner?
body: <p>I have an API named <em>getcampaignlist</em>. It returns me all campaign list with descriptions according to relevant person. Like in image I have multiple campaign with id and description. I want to set environment variable using</p>
  
  <p>"<code>postman.setEnvironmentVariable("cmid", jsonData.id)</code>;"
  or</p>
  
  <p>"<code>postman.setEnvironmentVariable("cmid", jsonData.id)</code>
  where
  <code>jsonData.campaignName==="online Games "</code>; "</p>
  
  <p><img src="https://i.stack.imgur.com/XlVMr.png" alt="For clarification check image"></p>
  
  <p>I mean I want to use all these id's in loop through collection runner. how can I set values in environment variable. Because when I set jsonData.id it can't decide which id value should be set in environment variable "cmid" and return false. </p>