<script
  src="https://code.jquery.com/jquery-3.6.0.js"
  integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk="
  crossorigin="anonymous"></script>
<script>const settings = {
	"async": true,
	"crossDomain": true,
	"url": "https://airport-info.p.rapidapi.com/airport?iata=lax&icao=warri",
	"method": "GET",
	"headers": {
		"x-rapidapi-host": "airport-info.p.rapidapi.com",
		"x-rapidapi-key": "cbd0d3eb8emsha34a637b16e3d0dp15bafajsnea0ccf76fd82"
	}
};

$.ajax(settings).done(function (response) {
 //console.log(response);
  arrays = Object.values(response); //object
 // arraysloc  = Object.values(arrays); // output location
  numbs = arrays.length; // length of each array
    if(numbs > 20 ){
       document.getElementById("demo").innerHTML = JSON.stringify(arrays);
    }
   else{
    alert("error");
    }
    for(var i = 0; i < arrays.length ; i++){
        console.log(arrays[i]);
        country =  arrays[3];
      //  const unquote = country.replace(/"([^"]+)":/g, '$1:');
        document.getElementById("country").innerHTML = (country);

    }
});</script>

<h4 id="demo"></h4>
<h4 id="country"></h4>

