Using Javascript to Build a Dynamic JSON array : <p>I want the JSON structure to be something like this:</p>

<pre><code>var data = [{ "label": "Category A", "value": 20 },
{ "label": "Category B", "value": 50 },
{ "label": "Category C", "value": 30 }];
</code></pre>

<p>I have a bunch of label and values that can be more than the 3 pairs above (it's dynamic).  The data for each label and value will also be differnt (entered by the user).</p>

<p>How do I create a JSON object like data when a user can enter as many label and value pairs with different data? Thanks,</p>
