I got data in rows for a column like this
[
{
"value": "A",
"path": "nth-child(1)"
},
{
"value": "K",
"path": "nth-child(2)"
},
{
"value": "C",
"path": "nth-child(3)"
}
]
Need help ..... Want to get data like this format in rows from that column
{
"A",
"K",
"C",
},
Have tried like this : but it combine all the rows of the table
SELECT LISTAGG(f.value:value::STRING, ',') AS col
FROM tablename
,LATERAL FLATTEN(input => parse_json(column_name)) f
I have used a CTE just to provide fake data for the example:
gives:
Thus with some string concatenation via
||
gives: