Document Write, Stringify One Record
<html><head>
<title> Document Write, Stringify One Record </title>
<script src="record.js"></script>
</head>
<body>
<script>
document.write(JSON.stringify(myRecord[1]));
</script>
<div id="theJsonOutput"></div>
</body>
</html>
<title> Document Write, Stringify One Record </title>
<script src="record.js"></script>
</head>
<body>
<script>
document.write(JSON.stringify(myRecord[1]));
</script>
<div id="theJsonOutput"></div>
</body>
</html>
//save as record.js
var myRecord = [
{
name: "Key",
height: "Five Ten",
weight: 140
},
{
name: "Donald",
height: "Five Nine",
weight: 160
}
];
var myRecord = [
{
name: "Key",
height: "Five Ten",
weight: 140
},
{
name: "Donald",
height: "Five Nine",
weight: 160
}
];