Question

I have a column data that holds a json document roughly like this:

{
    "name": "foo",
    "tags": ["foo", "bar"]
}

I would like to turn the nested tags array into a concatenated string (foo, bar). That would be easily possible with the array_to_string() function in theory. However, this function does not act on json arrays. So I wonder how to turn this json array into a Postgres array?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top