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

baptisteArno

10/01/2021, 1:23 PM
I'd like to do something like:
UPDATE test SET data = jsonb_set(data, '{name}', '"my-other-name"');
s

silentworks

10/03/2021, 3:50 PM
Not sure what I'm missing here, but that should work
Did you do this and it didn't work? or are you asking how to accomplish this with the supabase-js client library?
b

baptisteArno

10/03/2021, 3:52 PM
Oh yes, I meant can I do this with the client library 🙂
s

silentworks

10/03/2021, 3:53 PM
You should be able to pass a json payload to the update function for the field you define
But if you want to use the exact code you have there you can create a function in postgres and call it via the
.rpc
method
b

baptisteArno

10/03/2021, 4:07 PM
Thank you for the info @User
j

Jaeden

10/03/2021, 4:25 PM
Wasn't there something in the works for the JS SDK?
I thought I read that somewhere.