I have objects I'm trying to extract from a HTML file.
<h1> heading</h1>
<p> dsfhklsd sdlfjklsdj ljsdkflj</p>
{"data" : {"here" : "test"} }
<h2> heading</h2>
<p> dsfhklsd sdlfjklsdj ljsdkflj</p>
<p> dsfhklsd sdlfjklsdj ljsdkflj</p>
{"data2" : {"here" : "test"} }
How would I go about extracting the Objects so I can then parse them with JSON.parse() and use them in my JS code?
Essentially stripping anything that is not an object from the text / html file.
{"data" : {"here" : "test"} }
{"data2" : {"here" : "test"} }
<code>or<pre>tags but not the way it is shown