I have json data in which there is ampersand in the json path. how do I esacpe ampersand. I have tried these things but nothing is working - 1) set define off 2) escape ampersand - \& 3) using double ampersand - &&
SELECT id,array1
FROM (
select '{
"data": [
{
"id": 2,
"array1 & tr": "TEST",
}
]
}' AS JSON_DATA
FROM DUAL
) I,
json_table(
i.JSON_DATA ,
'$.data[*]'
COLUMNS (
array1 varchar2(4000) FORMAT JSON path'$."array1 & tr"',
ID varchar2(4000) path '$."id"'
)
) a
ORA-40442: JSON path expression syntax error