I am trying to open up a JSON string and have each key to be its own column. The JSON column lives in a Metadata table with key and polymorphic id.
I want to be able to parse every key into its own column with its corresponding value populated for each polymorphic id.
I can parse each key one by one with json_query, but I see there is a function call openjson which can parse the entire string, but I don't know how to use it since the example from the documentation are applying the function on a set value instead of a column from a table. If there a easier way to parse a JSON string than using json_query?