I am currently facing an issue where I need to load a local JSON file for development and testing purposes. The HTML file I am working on is in the same directory and resides locally on the C drive. Notepad++ recognizes this as a file and automatically converts it into a link. When I double-click it, the file opens without any problem. However, the JSON file fails to load on my web page. Despite trying various combinations of slashes, I have been unable to determine why it won't load. There are no errors shown in the page console either.
$.getJSON("file://C:/Users/ME/Desktop/Test/data.json", function(data) {
Is there a way to remove the "file://" part and only display the file name? This would be beneficial when sharing the folder with a friend, as I do not want them to go through the hassle of editing the link. Are there any suggestions on what I can do in this situation?
Thank you for your assistance!