json-pretty-html
Version:
Transforms a JSON object to a pretty piece of HTML Edit
27 lines • 489 B
HTML
<html>
<head>
<script src="../dist/bundle.js"></script>
<link rel="stylesheet" href="../style.css">
</head>
<body>
<script>
var json = {
"id": 2,
"name": "An ice sculpture",
"price": 12.50,
"tags": ["cold", "ice"],
"dimensions": {
"length": 7.0,
"width": 12.0,
"height": 9.5
},
"warehouseLocation": {
"latitude": -78.75,
"longitude": 20.4
}
};
var html = prettyPrint.default(json, json.dimensions);
document.write(html);
</script>
</body>
</html>