When you save the json in a jsonb column in Postgres, save it in this format
"{friend: [{\" name \ ": \" paolo \ ", \" value \ ": \" warrior \ "}, {\" name \ ": \" (label) \ ", \ "value \": \ "\"}]} "
I am sending this to you from ruby on rails
@proyecto.update(campos: '{"amigo": ' + ' [{"nombre":"paolo","valor":"guerrero"},{"nombre":"(label)","valor":""}]' + "}")
Why does this happen? because postgres changes the double quotes "with \", and how can I make it in my database to be recorded with this format?
{"amigo": [{"nombre":"paolo","valor":"guerrero"},{"nombre":"(label)","valor":""}]}
Help please.