On 11/14/2017 11:30 PM, hmidi slim wrote:
> I'm trying to use the function to_jsonb and create the name:
> to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}');
This query converts a string into a JSON object that consist of that
string. I guess what you intend to accomplish is rather:
select jsonb_build_object('key1', 'text1', 'key2', 'text2');