I am new to javaScript. I have already understood how to create object from JSON-file with JSON.Parse() and now I need to load multiple local JSONs into array. I've been googling my problem for a while, but everything that I found was related to single file. Is there any way to do this in pure JS without any libraries like jQuery and etc.?
P.S.: There is no need to work with web-server or else, the code is running locally.
You can do something like this:
If you already have an array of un-parsed files you could do this:
The following pseudo-code snippet might help you -
To do this, you need to first get the actual files. Then, you should parse them.
If you can't make an XML Request, you can also use a file reader object: