'Update jsonb field failed SQL Error [42601]

I have a jsonb type field, I need to update a field named 'action' using an update statement below:

update tickets set action = action || '[{\"reply_to\":0,\"date_time\":\"2022-04-09\",\"comment\":\"Testing only\",\"transaction_id\":39,\"user_email\":\"[email protected]\",\"task_status\":1,\"files\":null}] 

but it failed with message:

SQL Error [42601]: Unterminated string literal started at position 38 in SQL update tickets set action = action || '[{"reply_to":0,"date_time":"2022-04-09","comment":"Testing only","users_pid":39,"user_email":"s","task_status":1,"files":null}] . Expected char



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source