mercredi 17 mars 2021

How to search through a huge JSON file locally?


I have a giant JSON file hosted locally (+170 000 lines) which I would like to search through in Javascript/Jquery.
For the moment, I simply tried this:
$.getJSON("recipeList.json", (json) => {
    console.log("It Works !"); 
});

which doesn't seem to be working : no console.log, only an error in the console saying

[Violation] 'load' handler took 1142ms


Is there anyway I could make searches through this file, even though it is huge, and without taking too much time ?

I also have the url to the file hosted online (https://s3.amazonaws.com/openrecipes/20170107-061401-recipeitems.json.gz), but it seems I can't connect to it (CORS error about no header allowing me).




Aucun commentaire:

Enregistrer un commentaire