I'm trying to get values of fields in sql that is in JSON type. unfortunately path has '-' so that I get an error when I try to get the value.
field->** **{"Con":["AA"],"X-Location-Latitude":["55.06"]}
When I try to get json value with below query
SELECT JSON_VALUE(field, '$.X-Location-Latitude')
FROM table
I get this error
Json path is not properly formatted unexpected character '-' is found
I also tried adding double quotes as
SELECT JSON_VALUE(field, '$."X-Location-Latitude"')
FROM table
and this returned NULL.
Does anyone have a solution?