<script src="http://code.jquery.com/jquery-2.1.0.min.js"> </script>
<script>
var coordenadas;
function testAjax() {
$.ajax({
url: 'https://dev.datos.ua.es/uapi/5QGUfP3UM6j5VXERjKvU/datasets/11/data', type: 'GET',
dataType: "jsonp",
success: function (data) {
$.each(data, function (i, item) {
coordenadas = item.bbox.split(',');
console.log(coordenadas[1], coordenadas[0]);
});
}
});
}
</script>
<script>testAjax();</script>
Having that code, I get many latitudes and longitudes, a list of all of them but I would like to take only the first pair of longitude and latitude of all, since I only get them all out.