I have an array of jsonb
elements (jsonb[]
), with id and text. To remove an element I could use:
UPDATE "Users" SET chats = array_remove(chats, '{"id": 2, "text": "my message"')
But I want to delete the message just by the id, cause getting the message will cost me another query.
id
andtext
? – Erwin Brandstetter