Possible Duplicate:
I have a nested data structure / JSON, how can I access a specific value?
I recived data by ajax
<?
$locations[] = array(
'Name'=>$name,
'Latitude'=>$lat,
'Longitude'=>$long};
print_r(json_encode($locations));
?>
Here I have error, becasu it doesn't show anything when I tried with alert(data) and it work and show the array json that is below
success:function(data) {
var dat =$.parseJSON(data);
$("#pru").html(dat.Name); //here it doesn't show anything if I put alert(data) it show me all the array json
}
the array json content, the next array:
[{"Name":"Jayme jayden","Latitude":"36.712005","Longitude":"-4.43825"},
{"Name":"Jhonny","Latitude":"36.728744","Longitude":"-4.443822"},
{"Name":"Jessica Lynn","Latitude":"36.7418","Longitude":"-4.4333 "}]