Pushing to multidimensional object
<p>I'd like to end up with an object like:</p>

<pre><code>{"Red 1":53,"Blue 2":26,"Green 3":25}
</code></pre>

<p>From the following example:</p>

<p>Was trying to push the data from inside .each to the object, but it being multidimensional, i'm not sure how to accomplish this:</p>

<pre><code>//html
&lt;div class="test"&gt;
    &lt;div class="color"&gt;Red 1&lt;/div&gt;
    &lt;div class="value"&gt;53&lt;/div&gt;
&lt;/div&gt;
&lt;div class="test"&gt;
    &lt;div class="color"&gt;Blue 2&lt;/div&gt;
    &lt;div class="value"&gt;26&lt;/div&gt;
&lt;/div&gt;
&lt;div class="test"&gt;
    &lt;div class="color"&gt;Green 3&lt;/div&gt;
    &lt;div class="value"&gt;25&lt;/div&gt;
&lt;/div&gt;

//js
var dataPoints = {}; 
var colorTitle = '';
var colorValue = '';

$('.test').each(function(index) {
    colorTitle = $(this).find('.color').html();
    colorValue = $(this).find('.value').html();
    dataPoints.push({colorTitle:colorValue});
});
</code></pre>

<p>The code above clearly does not work, but I wanted to demonstrate basically what I am trying to do.</p>

<p>Tried this approach as well:</p>

<pre><code>dataPoints[index][colorTitle] = colorValue;
</code></pre>

<p>Which doesn't work either. Probably missing something all together, but any help is appreciated! Thanks</p>
