I have got following jsonb column in a table with example values:
{
"persons": [
{
"person": [
{"id": "1", "name": "John"}
]
},
{
"person": [
{"id": "2", "name": "Oscar"}
]
}
]
}
Is there a way to create a row value with 1-John, 2-Oscar? Suppose that there is not fixed number of persons for each row.
I tried several functions and crossjoins but nothing worked.