SupabaseS
Supabase•4y ago
Joakim

Pushing to array of uid

Hi!
I got a uid[] named likes. here I want to push a string of the used id. into it when the user presses like.

The type is set to uid, and defined as array.
I try to insert the uid if it's user. else they get sent to login page. this works well.
But I think I have chosen wrong. since I get back that I need to check the value of key likes. it expected a JSON array

So I tried making it JSON.stringify and pass it but then it's malformed array litteral

It's probably a simple task but I'm not used to it so hoping for guidance 😄
thanks in advance
image.png
image.png
Was this page helpful?