I'd like to append all the values(without the keys) from this JSON file to an array in a javascript file
JSON File:
[
{
"href": "https://www.instagram.com/p/test1/"
},
{
"href": "https://www.instagram.com/p/test2/"
}
]
JavaScript file:
var ids = [];
const makePost = (id) => `
<div class="post" id="${id}">
<blockquote
class="instagram-media"
data-instgrm-permalink="https://www.instagram.com/p/${id}/?utm_source=ig_embed&utm_campaign=loading"
data-instgrm-version="13">
Content - ${id}
</blockquote>
</div>`;
let htmlContent = ''
ids.forEach(id => {
htmlContent += makePost(id)
})
var d1 = document.getElementById('dynamic-content');
d1.insertAdjacentHTML('beforeend', htmlContent);