Javascript variable evaluation in a map
<p>I'm attempting to pass some data via the jQuery's <code>$.post()</code> and I'm running into some problems with, what I can only classify as, variable evaluation in the data map. Lets get to it:</p>

<pre><code>var field = 'fooVar';
var value = 'barVar';
$.post('/path/to/url', { field:value, 'fooString':'barString' });
</code></pre>

<p>The end result is a POST with the following values:</p>

<pre><code>// Actual result
field = barVar
fooString = barString

// Expected result    
foo = barVar
fooString = barString
</code></pre>

<p>I expected "field" to be evaluated as the variable "foo" in the data map, but it is not. What I've been able to discern is that the single quotes on the "key" are optional, therefore leaving them out does not cause the variable to evaluated. </p>

<p>I have also tried the following for giggles with the amount of luck:</p>

<pre><code>$.post('/path/to/url', { "'" + field + "'":value, 'fooString':'barString' });
$.post('/path/to/url', { eval(field):value, 'fooString':'barString' });
</code></pre>

<p>I'm stumped. Thanks for any help you can provide or even just a firm "no" so I can get on with my life, safe in the knowledge someone more versed has my back would be appreciated. :)</p>
