extracting multidimension json array in javascript
<p>I am reading a json response from a server which is sending a multidimensional array from a sqlite database using the following php code:</p>

<pre><code>while ($data = $result-&gt;fetchArray(SQLITE_NUM)) {
echo json_encode($data);
</code></pre>

<p>This works Ok and sends its data out as a string in the following format:
    [1,"Board1","Floor1",1,100,1,"D1","D2","D3","D4","D5","D6","D7","D8","D9","D10"]
    [1,"Board2","Floor2",1,100,1,"D1","D2","D3","D4","D5","D6","D7","D8","D9","D10"]
    [1,"Board3","Floor3",1,100,1,"D1","D2","D3","D4","D5","D6","D7","D8","D9","D10"]  </p>

<p>I am using jQuery to request this data from the server using the following code and want to save the recieved data in a javascript array so that I can access individual items using for example data[0][1] would to refer to the "Board2" element - but cannot seem to do this?</p>

<p>The code works with a single array, but not with multi-arrays?</p>

<p>JAVASCRIPT CODE:</p>

<pre><code>function requestMtrConfig() {
$.ajax({
    url: '/php/getmtrconfig.php',
    async:false,                    // synchronous read
    success: function(datas) {          
               data[0] = datas[0];
             data[1] = datas[1];
             data[2] = datas[2];
        }

    },       
    cache: false
});
}
</code></pre>

<p>How can I put the returned json array into a multi-dimensioned javascript array?
PS: I have already created a global multidimensioned javascripy array variable called data.</p>

<p>Any help would be much appreciated
thanks
Frank dobbs</p>
