123456789101112131415161718192021222324252627 |
- var request = new XMLHttpRequest();
- const url ='https:data.sfgov.org/api/views/yitu-d5am/rows.json?accessType=DOWNLOAD';
-
-
- request.open("GET" , url);
- request.onreadystatechange = function(){
-
- if ((request.status==200)&&(request.readyState==4)) {
- console.log(request.responseText);
- var jsonResponse = JSON.parse(request.responseText);
- otherFunction(jsonResponse);
- }
-
- function otherFunction(array){
- var out = "";
- for (var i = 0; i < array.length; i++) {
- if (array[i] === "Golden Gate Bridge") {
- array[i].dispaly
- }
- }
- document.getElementById('result').innerHTML += jsonResponse;
- }
-
- };
-
- request.send();
|