I have a JSON which is as given below and it’s stored in a column
{
"Name": "oxygen",
"StartDate": "2018-06-05",
"EndDate": "2018-06-22",
"Desc": {
"quality": "better",
"level,amount": "Scheduled",
"05": "carbon",
"GDP": "Max",
"CDF": "ZENE 1",
"OTBC": "REMO - MIXED UNIQUE"
}
}
How to find the 5th key pair value using sql query(SQL Server)
I have tried below methods
select JSON_QUERY(column_value,'$.Desc[5]') AS 'result' from table_name
select JSON_VALUE([column_value],'$.Desc[5]') as'result' from table_name
Expected result “CDF”: “ZENE 1”, Any help is appreciated.