I have a Postgres function with an insert statement in which one of the columns has to be converted to json and inserted into the table. Here, I want to remove the double-quotes that enclose the json object.
Please help on how to achieve it.
REPLACE(json_build_array(adm_id),'"', '')
The above code errors out saying replace(json, text, text) doesn't exist. I tried to cast it to text and remove the double-quotes, but when I convert it back to json, it again adds double-quotes.