First of all i am completly new to wix and i hope you can help me with this problem.
I want to import articles to my website, i have a json file with 10.000 articles, the size of the file is round about 50mb.
The json file looking like this:
{
"root": {
"item": [
{
"id": "1",
"mpn": "",
"text": "test",
"man": "",
"ean": "",
"price": "33",
"stock": "0",
"ordered": "",
"eta": "",
"indate": "",
"weight": "0.14",
"eol": "0",
"cat_id": "152",
"cat1": "Kabel & Adapter",
"cat2": "Computer",
"cat3": "",
"cat4": "",
"cat5": "",
"cat6": "",
"title":"test article",
"short_desc":"",
"short_summary":"",
"long_summary":"",
"marketing_text":"",
"specs":"",
"pdf":"",
"pdf_manual":"",
"images_s":"",
"images_m":"",
"images_l":"",
"images_xl":""
},
...
I use the getJSON function to fetch the json.
In the frontend i have a button what call this backend function.
export function getJsonProducts() {
getJSON(“link”)
.then(json => console.log(json.someKey))
.catch(err => console.log(err));
}
It works perfectly for smaller json files but every time i try to fetch the big JSON file i get nothing in the console (no outputs/errors) that why i think i get timed out.
Is there a way to fetch only pieces of the file?
Or I am completly stupid and there is a better way to fetch the file / import the file to the database?