Error I am getting:
SyntaxError: unexpected token: ':'
This is what is in the JSON file:
{ "Name":"John", "Age":30 }
This is what is in the JavaScript file reading the data:
var jsonFile = JSON.parse(test);
var Tag = document.getElementById("test");
Tag.innerHTML = jsonFile.Name;
This is the HTML tags I have added in the HTML file:
<script type="text/javascript" src="../static/test.json" async></script>
<script type="text/javascript" src="../static/java.js" async></script>
Why am I getting this error?