<svg viewBox="0 0 300 50" width="300">
<defs>
<style>
path{
fill: none;
stroke: #000;
stroke-width: 2px;
transition: 0.34s linear;
}
</style>
<marker id="arrow"
viewBox="0 0 10 10"
refX="5"
refY="5"
markerWidth="8"
markerHeight="8"
orient="auto-start-reverse">
<path d="M-20,-20 5,5 -14,24"/>
</marker>
</defs>
<path class="js_path" d="M5,24 100,24" marker-end="url(#arrow)" />
</svg>
<svg viewBox="0 0 400 400"></svg>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.parent{
display: flex;
}
.parent_child{
padding: 30px;
background: red;
margin: 10px;
}
</style>
</head>
<body>
<div class="parent"></div>
<script src="app.js"></script>
</body>
</html>
function readTextFile(file, callback) {
var rawFile = new XMLHttpRequest();
rawFile.overrideMimeType("application/json");
rawFile.open("GET", file, true);
rawFile.onreadystatechange = function() {
if (rawFile.readyState === 4 && rawFile.status == "200") {
callback(rawFile.responseText);
}
}
rawFile.send(null);
}
let parent = document.querySelector(".parent");
readTextFile("main.json", function(text){
var data = JSON.parse(text);
for(let i = 0; i<data["723"].children.length; i++){
let block = document.createElement("div");
block.classList.add("parent_child")
parent.append(block)
}
});