0

As you propably understood i'm new to JavaScript.

I am trying to make a table from JSON, I found some tutorials on that, but my JSON content is really long (1700 lines) and my code will look really complicated if I paste in the tag.

So I am trying to make something like this:

<script>
var data = /files.json
...
</script>

Is that possible?

  • 3
    There are various ways here: [How to read an external local JSON file in JavaScript?](/q/19706046/4642212). Soon, there’ll be a [JSON import](//github.com/tc39/proposal-json-modules). – Sebastian Simon Jul 08 '21 at 18:00

0 Answers0