Get h2 tags from .Content


I’m trying to generate JSON-LD for a website I’m currently making. Was wondering if there was a way to pull headling like ## My heading tag from the content to use in json-ld. I’ve searched around and can’t seem to find anything that allows you to pull anything from the .Content section. I was thinking something like.Content.h2 then I could iterate through them to generate json ld.

Here is a link to what im trying to generate. basically want to generate different offers based off of h2 tags

Any help would be appreciated.
Thank you

You could parse .Content after rendering. Related:

Or use a heading render hook to store the headings in a page-level Scratch.

Thank you for the response, is there anymore documentation?

Did you try this button?