Skip to content

Instantly share code, notes, and snippets.

@frbl
Created June 11, 2017 09:12
Show Gist options
  • Save frbl/77bd3a60b3c97c7f31b0e70ed3a7b43f to your computer and use it in GitHub Desktop.
Save frbl/77bd3a60b3c97c7f31b0e70ed3a7b43f to your computer and use it in GitHub Desktop.
Simpel voorbeeldje voor het lezen van de JSON
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
</head>
<body>
<ul id='data'>
</ul>
<script>
$(document).ready(function() {
$.get('170609_response_contents_array.json', function(data) {
console.log(Object.keys(data[1]));
console.log(Object.keys(data[1].content));
data.forEach(function(entry) {
$("#data").append('<li>'+entry.created_at.$date+'</li>');
})
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment