Hey guys I'm new to SupaBase, does anybody know ho...
# help
s
Hey guys I'm new to SupaBase, does anybody know how to create a query to remove an object from the array by matching an id.
n
Hello @Scooby-Doo! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
You need to provide more info on your column type and structure and where you are trying to do this query from.
n
Scooby-Doo (2022-05-04)
s
this is my table structure and I want to pull the UUID from the likes array by matching an id
g
Any reason you are using json for the likes instead of array of uuid? (although I can't tell from your image what the actual json data looks like). Either way to delete and element from an array I believe you will need to do it in SQL. Assuming you want to do the operation from the client that means calling with an rpc call. If those are just uuid's in an array then you can just do UPDATE users SET ilikes = array_remove(ilikes,uuid). json(b) is more complicated, but I don't use it enough to offer anything.
s
thanks