title: how to assign variable value as variable name in a hash?
body: <p>I need to define a hash for posting some ajax data using jQuery.
  The hash will look something like:</p>
  
  <pre><code>var setname = 'set_1';
  elements = { set_1: {'beer','water','wine'} };
  </code></pre>
  
  <p>The challenge I need to solve is 'set-1' (the key of Array elements) should be dynamically named based on the value of <code>var setname</code>.</p>
  
  <p>I want to avoid using <code>eval()</code> of course..
  in PHP it can be done using the double dollar sign like this: <code>$$setname</code>, but what's the way to do this in JavaScript?</p>