Skip to content

Instantly share code, notes, and snippets.



Last active Jan 19, 2018
What would you like to do?

Using highlight.js

<html lang="en">
<meta charset="UTF-8" />
<script src="//"></script>
<script src=""></script>
<link href="" rel="stylesheet" />
#code1{ width: 300px;}
<div class="container">
<pre><code class="javascript" id="code1">
<script type="text/javascript">
var data = [{ "id": 1, "name": "A", "size": 3 },
{ "id": 2, "name": "B", "size": 8 },
{ "id": 3, "name": "C", "size": 2 },
{ "id": 4, "name": "D", "size": 5 },
{ "id": 5, "name": "E", "size": 4 }
];"#code1").html(JSON.stringify(data, false, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.