select json_data->>'linename' l ,k ,json_data->>k v from copperline, lateral json_object_keys( json_data ) k where json_data->>'linename' like '40000100188'; select service_name,service_type,crm_customer_id, crm_contract_id , status,k->'key' k,k->'value' v from service , lateral json_array_elements( json_data->'attributes' ) k where service_type like 'ACCESS%'