var JSON = jQuery.getJSON( //cdn.shopify.com/s/files/1/0453/9491/9579/t/1/assets/json.js?4166 ); fetch('//cdn.shopify.com/s/files/1/0453/9491/9579/t/1/assets/json.js?4166') .then(res => res.json()) .then(data => obj = data) .catch(err => console.error(err)) var JSON = JSON.parse( document.getElementById('JSON').innerHTML);