Flatten nested join
This request returns a data object with the following structure:
Is this possible to flatten that like so:
So that I don't get an extra photo property? Without doing a for loop but directly in the query string of the select?
supabase
.from('playground')
.select(`
photos:playground_photos(
photo(*)
),
`).eq('id', playgroundId)
.single(){
photos: [
{
photo: {...}
},
{
photo: {...}
}
]
}{
photos: [
{
...
},
{
...
}
]
}