I am struggling with creating a for loop to return an array from a JSON file named data.json. Here is the desired array structure:
var arr=[["CR7012","",100,1,100],[CR7012,"bla bla bla",100,5,500],["CR7012,"bla bla bla",100,1,100]]
The content of data.json is as follows:
{ "prodotti": [ { "articolo": "CR7012", "descrizione": "", "prezzo": 100, "quantita": "1", "totale": 100 }, { "articolo": "CR7012", "descrizione": "bla bla bla", "prezzo": 100, "quantita": "5", "totale": 500 }, { "articolo": "CR7012", "descrizione": "bla bla bla", "prezzo": 100, "quantita": "1", "totale": 100 } ], }
I appreciate any assistance provided. Thank you.