I can't figure out why this issue is occurring, but here is the code I'm working with:
<div id="list">
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$.ajax({
type:"get",
url:"https://cors-anywhere.herokuapp.com/http://41.78.37.222/dev/api.php?action=list",
success: function(data){
result="";
for(i in data){
result+="MAKE: "+data[i].make+" // TYPE: "+data[i].type+"<br>";
}
$("#list").html(result);
}
});
});
</script>
Please note that I am using before my API URL to bypass CORS Policy error (temporarily). The API URL I'm using is
When I run the code, it currently shows:
MAKE: undefined // TYPE: undefined
instead of something like:
MAKE: BMW 320i (E90) 2009 Facelift // TYPE: Standard