Alright so I am sending some data from PHP to Ajax (works perfectly) using Json but my problem comes in why I want to split that response.
How do I use for example alert every element?
$.ajax({
url:"myHandler.php",
type:"POST",
data:{function:"rxz", xLast:xx, yLast:yy},
dataType:'json',
success:function(data){
alert(data); //How do I alert EVERY single data element on its own?
},
error:function(data) { console.log(data); }
});
The stuff from PHP is sent like this
print json_encode(array($json_array,$from,$to));
It basically sends an array & contains From and To inside of it