title: Access "variable" environment variable using dynamic javascript variable names
body: <p>I have an issue. In my Host/cloud solution, I must use environment variables of pricing for each country this way 'defined in their "Environment Variables").</p>
  
  <pre><code>BASIC_PRICE_FR_PRODUCT = "50";
  COMPLEX_PRICE_FR_PRODUCT = 100;
  
  BASIC_PRICE_UK_PRODUCT = "37";
  COMPLEX_PRICE_UK_PRODUCT = "200";
  
  BASIC_PRICE_ES_PRODUCT = "75";
  COMPLEX_PRICE_ES_PRODUCT = "300";
  </code></pre>
  
  <p>I can access those using process.env.XXX such as <code>process.env.BASIC_PRICE_FR</code></p>
  
  <p>As you see these environment variables depend on the country as the price vary from one country to the other.</p>
  
  <p>In our node.js app, the challenge is that when a function is executed, it is self aware of the country so, we can (and must) use the "current" country and the current country_iso_code ("fr" for example), and with this we must use the pricing that match this country.</p>
  
  <p>After reading on SO some posts on "dynamic variable names" , I tried eval, global[] and window[] like below, but none work and all outputs "undefined" values</p>
  
  <pre><code>//note: iso_code_3166_we_can_use is something passed to the function by the final user or by some other lambda in the function context.
  const current_country_iso_code_uppercase = iso_code_3166_we_can_use;
  const basicPrice   = parseInt( "process.env.BASIC_PRICE_" + current_country_iso_code_uppercase + "_PRODUCT")
  console.log(basicPrice)//bug here as outputs "undefined"
  </code></pre>
  
  <p>EDIT</p>
  
  <p>The suggestion of using process.env['xxx'] did not work so I add here the results</p>
  
  <pre><code>console.log(process.env.BASIC_PRICE_FR_PRODUCT);//outputs 50
  console.log('BASIC_PRICE_' + iso_code_uppercase + '_PRODUCT' );//just to be sure :): outputs BASIC_PRICE_FR_PRODUCT
  console.log( process.env['BASIC_PRICE_' + iso_code_uppercase + '_PRODUCT'] );// DOES NOT WORK, outputs undefined
  </code></pre>