Created
October 20, 2020 16:02
-
-
Save roberrrt-s/3a646ac98e68e513a60b6e92a6ec76c7 to your computer and use it in GitHub Desktop.
json-to-js-data-loading-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function data() { | |
return { | |
data: [ | |
{ | |
"property": "waarde", | |
"getal": 1, | |
"misschien": true, | |
}, | |
{ | |
"property": "waarden", | |
"getal": 12, | |
"misschien": false, | |
} | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="author" content="robert"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Data inladen zonder local server</title> | |
</head> | |
<body> | |
<script src="data.js"></script> | |
<script src="script.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var survey = data(); | |
console.log(survey); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment