How i can access to JSON data? : <p>i have created a dynamic array and then,  i  convert  it  to  json object. The code is the follows:</p>

<pre><code>$array_D1[]="";
$array_D2[]="";
$array_to_send[]="";

$array_D1[$CapaEnviar][] = $fila['test_name'];
$array_D2[]=$seleccio_content;
$array_D2[]=$id_capa;
$array_D2[]=$pagina;
$array_D2[]=$idtest;
$array_D2[]=$valor_org;
$array_D2[]=$valor_eval;
$array_D2[]=$valor_test;

$array_to_send=array('data1' =&gt; $array_D1, 'data2' =&gt; $array_D2);

echo json_encode($array_to_send,true);
</code></pre>

<p>This code is a AJAX response for an AJAX request. I don't know how i can access JSON data  from jquery.</p>

<p>i need to acces the values from "data1" and "data2"</p>
