; let posts = json.graphql.user.edge_owner_to_timeline_media.edges.map((edge) => edge.node); console.log(posts); for (let i = 0; i < 9; i++) { let imgTag = document.createElement("img"); imgTag.border = "0"; imgTag.src = posts[i].thumbnail_src; let aTag = document.createElement("a"); aTag.target = "_blank"; aTag.href = `https://www.instagram.com/p/${posts[i].shortcode}/`; aTag.appendChild(imgTag); let item = document.getElementById(`item-${i}`); item.appendChild(aTag); }