Open this example in the interactive library
Source code
SELECT json_replace('[2,4,8]','$[1]',6) AS point;
Sample output
[
{
"point": "[2,6,8]"
}
]
Open this example in the interactive library
SELECT json_replace('[2,4,8]','$[1]',6) AS point;
[
{
"point": "[2,6,8]"
}
]