I am creating a weather based artwork-change to be hosted on a local machine with the JSON file updating through an FTP sync. This means that the JSON file will be sourced locally on the same computer. Below is my current code for sourcing the JSON externally. Could you help me with sourcing this locally. Would I just change the URL to the file pathway of where it will be sitting? 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 all for helping!