https://supabase.com/ logo
#help
Title
# help
s

Sealion

01/26/2022, 7:59 PM
When querying with a foreign key a object is returned, how do i change it so it become key-value
Hey guys
That's my query
It returns the follwoing
Can I edit the query so it returns users: { name 'Johnnny boy' } to something like users: 'Johnny Boy' instead?
v

VuNguyen

01/27/2022, 6:02 PM
I don't think you can, maybe u can write a postgresql function to do this
s

Sealion

01/28/2022, 1:49 PM
Yeah
My solution right now is to handle it on the server, modify the response. But thought it would be nifty if it was possible to flatten it when writing the query