I'm facing some issues while trying to select a value from a JSON column. The json is:
{
"$type":"myNameSpace.myClass, myDll"
}
And I'm trying to query it with something like
SELECT myIdColumnName, myJsonColumnName, JSON_QUERY(myJsonColumnName, '$.$type') as mType
the problem is that the path '$.$type' is invalid, the italian error is:
Il formato del percorso JSON non è corretto. È stato trovato il carattere imprevisto '$' nella posizione 2.
which basically tells that the parser does not expect "$" after ".". I already tried using '$.type' and '$."$type"' but it in both cases I get null as mType.
Could you tell me the right syntax for this query?
Thank you