This to me looks like a homework type assignment or possibly an interview question, but I'll try to help without giving the answer away.
So my first step would be to validate your input. The first bit you indicated should be table data so we can ignore that. The second bit though is still not valid JSON, there is no work for SQL to do.
Now, assuming the JSON WAS in valid format, Microsoft has a pretty good writeup on how to parse JSON here - https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver15
Assuming that the invalid JSON for the answer is expected and you are expected to provide the corrected JSON output, I would start by coding the first bit up as an INSERT statement which is trivial to do. Create the table, then copy-paste the remainder into an INSERT statement. Next, do a SELECT to confirm that the table contains the EXACT same data as the top part of the text. 1/2 the battle is done.
Next step, use the link I provided to look up how to SELECT to a JSON object and you are done.
Now, if you need this to be more automated, that is going to be a bit more work to do but is entirely possible. Since I suspect this is a homework assignment, I doubt automation is required...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.