corsik,
var data;
var xhr = new XMLHttpRequest();
xhr.open('GET', '../include/events.json', true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
try {
data = JSON.parse(xhr.responseText, function(key, value) {
return (key == 'Date' ? new Date(value) : value);
});
} catch(e) {
console.log(e.name);
}
}
};