I want to extract many objects (not all object) in JSON but don't want to type for every single thing like this:
Select *,
metrics::json ->> 'spend',
metrics::json ->> 'impressions',
metrics::json ->> 'clicks'
from t1
Here my DEMO show real data and case, how to extract to multiple columns and cast it to exact data type (float, integer)
I refer this question, can I use json_to_record
for this or other method and how?