Multidim json array javascript, how to grab values
<p>I have this data response from an AJAX call:</p>

<pre><code>{"18:00":{"twopersons":1,"fourpersons":0}}
</code></pre>

<p>Which gets stored into a variable by <code>statsarray = data;</code></p>

<p>Now how can i loop through statsarray and output the <code>twopersons</code> value?</p>

<p>So I can alert:</p>

<pre><code>18:00 - There's 2 x 2persons and 0 x 4persons
</code></pre>

<p>Here is the Ajax call:</p>

<pre><code>var statsarray;
var currentloopeddate = test_date.toString('yyyy-MM-dd')
$.post("/home/sessions",
    { action: 'partner_calendar_checkseats', date: currentloopeddate },
    function(data) { statsarray = data; }
);
</code></pre>
