<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JSON Key not found</title>
</head>
<body>
<script>
s = '{"name":"Gideon Koch"}';
j = JSON.parse(s);
console.log(j.name);
console.log(j['name']);
console.log(j.age); // age not found
console.log(j['age']);
console.log(Object.keys(j));
Object.keys(j).forEach(function(k) { console.log(k + ' - ' + j[k]); }); // inline function
for(var k in j) { console.log(k + ' - ' + j[k]) };
</script>
</body>
</html>