please someone help me to solve this problem.
i am getting data with XMLHttpRequest from php as json array, here is the data.
with this Codes
const API_PATH = 'http://localhost/api/';
window.onload = function(){
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
document.getElementById("all_service").innerHTML = this.responseText;
};
request.open('GET', API_PATH + 'getServices.php');
request.send(null);
}
how to load on div and level
<div id="all_service">
<label class="service-name">Service Name</label>
<label class="service-description">description</label>
<label class="service-offers">deals</label>
<img class="service_image" src="img/service1.png">
</div>