Calling a javascript array without knowing naming conventions in advance
<p>I am calling an ajax function that returns a dataset (response) with data column labels.  One of the column labels changes depending on where the call was initiated from.  </p>

<p>Normally the following code accesses the response variable if the column label is hard coded:</p>

<pre><code>for (var i = 0; i &lt; response.d.length; i++) {
  data.setValue(i, 1, response.d[i].Emissions);
}
</code></pre>

<p>However, I need to be able to access the response variable using a separate string variable that is passed in since the label changes.  Below is my feeble attempt at doing it, but it isn't working.  What is the correct syntax for doing that?  </p>

<pre><code>var columnLabel = 'Emissions';
for (var i = 0; i &lt; response.d.length; i++) {
  data.setValue(i, 1, response.d[i].columnLabel);
}
</code></pre>
