Please try the following.
SQL
DECLARE @json NVARCHAR(MAX) =
N'{
"exports": [
{
"uuid": "1234ABCD",
"status": "FINISHED",
"filters": {
"severity": [
"INFO",
"CRITICAL"
],
"state": [
"FIXED"
],
"tags": {},
"since": 0
},
"chunk": 500,
"created": 16224576597
},
{
"uuid": "5678ABCD",
"status": "STARTED",
"filters": {
"severity": [
"INFO",
"LOW",
"MEDIUM",
"HIGH",
"CRITICAL"
],
"state": [
"OPEN",
"REOPENED"
],
"tags": {},
"since": 0
},
"chunk": 500,
"created": 6587658868
},
{
"uuid": "1234ZXYG",
"status": "FINISHED",
"filters": {
"severity": [
"HIGH",
"CRITICAL"
],
"state": [
"FIXED"
],
"tags": {},
"since": 0
},
"chunk": 500,
"created": 87678656858
}
]
}';
SELECT JSON_VALUE(exports.value, '$.uuid') as uuid
, JSON_VALUE(exports.value, '$.status') as [status]
, JSON_VALUE(exports.value, '$.chunk') as [chunk]
, JSON_VALUE(exports.value, '$.created') as [created]
, JSON_QUERY(exports.value, '$.filters.severity') as [severity]
, JSON_QUERY(exports.value, '$.filters.state') as [state]
, JSON_VALUE(exports.value, '$.filters.tags') as [tags]
, JSON_VALUE(exports.value, '$.filters.since') as [since]
FROM OPENJSON (@json, 'strict $.exports') as exports;
SELECT JSON_VALUE(exports.value, '$.uuid') as uuid
, severity.Value AS [Severity]
FROM OPENJSON (@json, 'strict $.exports') as exports
CROSS APPLY OPENJSON(exports.value, 'strict $.filters.severity') as severity;
SELECT JSON_VALUE(exports.value, '$.uuid') as uuid
, state.Value AS [State]
FROM OPENJSON (@json, 'strict $.exports') as exports
CROSS APPLY OPENJSON(exports.value, 'strict $.filters.state') as state;