If you’re struggling with basic html how to read json of data, try this:
1. Make sure your JSON file is in the same folder as your HTML.
2. Use `<script src="yourfile.js"></script>` to link your JS.
3. In the JS file, fetch the JSON and loop through it to display stuff.
Example:
```javascript
fetch('data.json')
.then(res => res.json())
.then(data => {
document.body.innerHTML = JSON.stringify(data);
});
```
It’s crude, but it’ll show you the data!
1. Make sure your JSON file is in the same folder as your HTML.
2. Use `<script src="yourfile.js"></script>` to link your JS.
3. In the JS file, fetch the JSON and loop through it to display stuff.
Example:
```javascript
fetch('data.json')
.then(res => res.json())
.then(data => {
document.body.innerHTML = JSON.stringify(data);
});
```
It’s crude, but it’ll show you the data!
