1function appendData(data) {
2 var mainContainer = document.getElementById("myData");
3 for (var i = 0; i < data.length; i++) {
4 var div = document.createElement("div");
5 div.innerHTML = 'Name: ' + data[i].firstName + ' ' + data[i].lastName;
6 mainContainer.appendChild(div);
7 }
8}
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta http-equiv="X-UA-Compatible" content="ie=edge">
7 <title>JSON Test</title>
8</head>
9<body>
10 <div id="myData"></div>
11 <script>
12 fetch('people.json')//file json objects
13 .then(function (response) {
14 return response.json();
15 })
16 .then(function (data) {
17 appendData(data);
18 })
19 .catch(function (err) {
20 console.log('error: ' + err);
21 });
22 function appendData(data) {
23 var mainContainer = document.getElementById("myData");
24 for (var i = 0; i < data.length; i++) {
25 var div = document.createElement("div");
26 div.innerHTML = 'Name: ' + data[i].firstName + ' ' + data[i].lastName;
27 mainContainer.appendChild(div);
28 }
29 }
30 </script>
31</body>
32</html>
1CopyCREATE TABLE j_purchaseorder
2 (id VARCHAR2 (32) NOT NULL PRIMARY KEY,
3 date_loaded TIMESTAMP (6) WITH TIME ZONE,
4 po_document VARCHAR2 (23767)
5 CONSTRAINT ensure_json CHECK (po_document IS JSON));