I am trying to access the content in eventbrite emails that I receive but the html code doesn\'t have an ID associated to the JSON-LD script. So is there a way to still acce
You can get all JSON-LD blocks with
document.querySelectorAll('script[type="application/ld+json"]');
or just the first one with
document.querySelector('script[type="application/ld+json"]');
Here's a full example:
var jsonld = JSON.parse(document.querySelector('script[type="application/ld+json"]').innerText);
document.getElementById('result').innerText = jsonld.endDate;
The end date is: