I found a code snippet showing how to fetch data from a JSON array:
<div id="placeholder"></div>
<script>
var data={"users":[
{
"firstName":"Ray",
"lastName":"Villalobos",
"joined":2012
},
{
"firstName":"John",
"lastName":"Jones",
"joined":2010
}
]}
document.getElementById("placeholder").innerHTML=data.users[0].firstName + " " + data.users[0].lastName+" "+ data.users[0].joined;
</script>
But I want the data in a JSON File. So how can I do this?