Hello,
I have a data.json in script folder and it contains:
{
“test”: 10
}
in same folder there is game.js where I have used fetch:
fetch(“resources/data.json”)
.then(response => response.json())
.then(data => { console.log(data) })
it doesn’t work.
Is there any better way to use fetch or access .json file?.