Hi Folks:
I am trying to create a nested json object using JSON_OBJECT and am getting a 
json with escaped quotes.  
I have the following query in sql line :
select JSON_OBJECT(    KEY 'level1'     VALUE(        JSON_OBJECT(            
KEY 'level2'             VALUE(                 JSON_OBJECT(                    
  KEY 'level3'                       VALUE 'val3')                 )            
 )         )       ) from (values ('{"a":{"b":2}}')) t(v);
And it produces the result:

+-------------------------------------------------------------+

|                           EXPR$0                            |

+-------------------------------------------------------------+

| {"level1":"{\"level2\":\"{\\\"level3\\\":\\\"val3\\\"}\"}"} |
+-------------------------------------------------------------+
Is it possible to create a result which is a proper json object:
{"level1":{"level2":{"level3":"val3"}}} 

If there any other function/udf that I can use, please let me know.
Thanks

Reply via email to