When I upload my project to the FTP server the JSON file I'm pulling data from is not working properly. but when I run the program from XAMP, my local server, it runs perfectly fine. I noticed the JSON is not being read correctly by inspecting the element on the FTP server. This is what it looks like:
Here is the app being ran off my local server, where i inspect the element. This is currently working:
This is how I am accessing the file in my code:
$.ajax({
url: 'includes/js/jsons/' + location_name + '.json',
datatype: 'json',
success: function(parsed_json){
// doing stuff
});
Any ideas on why this could be messing up?
Note: I don't think that my JSON file is being recognized as a JSON file but rather a HTML doc or something.