Postgres random text in JSONB column
You have to use the md5 hash as a part of the string so you have to concat it


CREATE TABLE people(&quot;id&quot; varchar(50), &quot;data&quot; jsonb,&quot;firstName&quot; text, &quot;lastName&quot; text)




    update people set
    data = to_jsonb(data) || ('{&quot;firstName&quot;: &quot;' || MD5('PostgreSQL MD5') || '&quot;, &quot;lastName&quot;: &quot;' || MD5('PostgreSQL MD5') || '&quot;}')::jsonb
    where id = 'b3c09005-7afb-4ad6-922d-76078875e59e';


db&lt;&gt;fiddle here
still md5 is old and not very secure, so you should use a more secure version