{ let scriptID = 'js-header-shop'; let images = [ { src: '/product_images/uploaded_images/auv-ss19-ed12-29394444.jpg?t=1587981965&_ga=2.5998459.954127586.1587824167-958386593.1586521063', url: '/all/', title: 'DISCOVER THE POWER OF GOLD', subtitle: 'Shop All Jewelry', }, ]; let html = _.template(` <% for (let [facet, filter] of Object.entries(filters)) { %> <% } %> <% for (let { src, url, title, subtitle } of images) { %> <% } %>`)({filters: window[''], images}); document.querySelector('#' + scriptID).outerHTML = html; }