I'm looking to make an object containing latitudes and longitudes of various places such as [["Second Event",19.0554748,72.8497017],["Demo Event",19.2097381,72.8737017]]
.
I'm successful of making this in php
by using json_encode()
function. How do I retrieve it in the callback function. I've tried the following:
$.post('maps1.php',{},function(data){
alert(data);
markers=JSON.stringify(data);
},"json");
alert(markers);
However this doesn't seems to work. What should I do?