i have created a dynamic array and then, i convert it to json object. The code is the follows:
$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' => $array_D1, 'data2' => $array_D2);
echo json_encode($array_to_send,true);
This code is a AJAX response for an AJAX request. I don't know how i can access JSON data from jquery.
i need to acces the values from "data1" and "data2"