WITH data AS (
SELECT json_merge(fav.favorites::json, '{"111111": "2000-00-00 11:07:05.710000","123123": "1999-00-00 11:07:05.710000"}'::json)::json
FROM mobappb2c_profile.client_material as fav
WHERE crm_id = '123')
    sku2date.key AS sku
FROM data AS fav,
     to_jsonb(fav) as js,
     jsonb_each(js) AS sku2date
order by sku2date.value desc;

so i want to merge some json and after merging i need to select all keys but when i do in second select jsonb_each(... i get result value :


how does it possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.