I have the following code:
$.ajax({
url: 'http://127.0.0.1:8899/list',
dataType: "jsonp",
jsonpCallback: "_testcb",
cache: false,
timeout: 5000,
success
rocessMarkers ,
error: function(jqXHR, textStatus, errorThrown)
{
alert('error ' + textStatus + " " + errorThrown);
}
});
This get's list from server in following format:
_testcb('[{"name":"","type":"","location":"","lat":"","lng":"","description":"","_id":"51d19900d7dad9500a000001"},{"name":"","type":"","location":"","lat":"","lng":"","description":"","_id":"51d19900d7dad9500a000002"},{"name":"","type":"","location":"","latitude":"","longitude":","description":"","_id":"51d19900d7dad9500a000003","lng":"","lat":""}]')
I have emptied the data values for the post, except for the id field.
How do I now iterate through this and read each value individually?
If anyone can maybe shed some light on the matter.
$.ajax({
url: 'http://127.0.0.1:8899/list',
dataType: "jsonp",
jsonpCallback: "_testcb",
cache: false,
timeout: 5000,
success
error: function(jqXHR, textStatus, errorThrown)
{
alert('error ' + textStatus + " " + errorThrown);
}
});
This get's list from server in following format:
_testcb('[{"name":"","type":"","location":"","lat":"","lng":"","description":"","_id":"51d19900d7dad9500a000001"},{"name":"","type":"","location":"","lat":"","lng":"","description":"","_id":"51d19900d7dad9500a000002"},{"name":"","type":"","location":"","latitude":"","longitude":","description":"","_id":"51d19900d7dad9500a000003","lng":"","lat":""}]')
I have emptied the data values for the post, except for the id field.
How do I now iterate through this and read each value individually?
If anyone can maybe shed some light on the matter.