How to build an literal array from list object?
<p>I have the list object that I'm passing using json. How can I convert it to array like you can see below using jquery or javascript?</p>

<pre><code>List&lt;MyItem&gt; items = new List&lt;MyItems&gt;();
items.Add(new (){ItemName = "Apple", ItemCount = 5});
items.Add(new (){ItemName = "Tomato", ItemCount = 3});
items.Add(new (){ItemName = "Banana", ItemCount = 8});
items.Add(new (){ItemName = "Avokado", ItemCount = 5});
items.Add(new (){ItemName = "Potato", ItemCount = 9});
items.Add(new (){ItemName = "Onion", ItemCount = 1});
</code></pre>

<p>Array</p>

<pre><code>var raw_data = [['Apple', 5],
                ['Tomato', 3],
                ['Banana', 8],
                ['Avokado', 5]];
</code></pre>
