My question: How can I parse a json array?
I send it like this:
$data= mysql_fetch_array($r);
header('Content-type: application/json');
?>
{
"check": "<?php echo $check?>",
"productcode": "<?php echo $code?>",
"values": [<?php echo $data?>]
}
<?php
on the ajax side I do this on the single values which works fine
success: function(data,textStatus){
//return values
identification=data.check;
if I want to access the array I do something like this and I get undefined
value=data.values[1];
What am I doing wrong?