I am currently working on an artistic project based on weather data, which will be hosted locally with the JSON file updating via FTP synchronization. This means that the JSON file will be sourced from the same computer where it is stored. The code snippet below shows how I'm currently sourcing the JSON file externally. I need assistance in altering it to source the file locally. Do I simply change the URL to the file pathway where it will be located and remove the GET and send parts?
var xhr = new XMLHttpRequest();
var URL = "http://api.openweathermap.org/data/2.5/weather?q={London}&appid=genericAPIpassword";
xhr.open("GET", URL, false);
xhr.send();
var weatherResponseStringify = JSON.stringify(xhr.responseText, "", 2);
var weatherResponseParse = JSON.parse(xhr.responseText);
Thank you for any help you can provide!