I have inserted some test data like below:
INSERT INTO tblDataInfo (lookupkey, lookupvalue, scope)
VALUES ('diskname', '/dev/sdb', 'common')
yours sincerely
I wanted to query this data and like to obtain the query output in JSON format.
I have used the query
select lookupvalue as 'disk.name'
from tblDataInfo
where lookupkey = 'diskname' FOR JSON PATH;
This query returns
[{"disk":{"name":"\/dev\/sdb"}}]
which is escaping all my forward slashes (/
) using the escape character (\
). How can I have my output not to put escape-character (\
)?