There is a VARCHAR column jsonString that has simple text that is formatted as JSON:
id jsonString
1 {"topData":{"personName":"john","personAge":"20"}}
2 {"topData":{"personName":"mike","personAge":"30"}}
3 {"topData":{"personName":"sten","personAge":"50"}}
How to parse this string? It is not a JSON object, so do we need to cast it as JSON first?
select OPENJSON(cast(jsonString as JSON)
I have tried many ways but couldn't extract personName and personAge as separate values.