I'm new to javascript and web dev. I have been trying to figure out a way to parse a JSON file in a folder locally on my computer right now. I was attempting to use jQuery's getJSON function but it doesn't seem to work. I also saw a post on using XMLHttpRequest. Since it's a local file, I don't think either of the method works. What's a proper way of doing it before doing JSON.parse() ? There are many posts about this topic but I still haven't found one about avoiding http protocol.
Aucun commentaire:
Enregistrer un commentaire