Open this example in the interactive library
Source code
SELECT json_extract('[4,8,12]','$[#-1]') AS last;
Sample output
[
{
"last": 12
}
]
Open this example in the interactive library
SELECT json_extract('[4,8,12]','$[#-1]') AS last;
[
{
"last": 12
}
]