Staff ask for help from friends:
The code makes an ajax request to take data from an api (json) and go through all objects inside the array
My json = [{Name: "Ajato 2000"}, {Name: "Crystal I"}]
In the case how do I list or print the data with html using a list attribute I know how to do this with php plus with html I know that and type so
document.getElementById ('display'). value;
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script><script>$.ajax({type:"POST",
dataType: "json",
url: "https://coarinet.com/kibarcos/api",
success: function(data) {
for (var i in data) {
Nomes= data[i]["Nome"];
}
}
});
</script>
<p id="id_nome"></p>
</body>
</html>