【发布时间】:2020-10-14 00:29:00
【问题描述】:
我有 json 列,它是这样的数据-
{"image_pose_array": [{"image_name": "0026568143_WS.jpg", "image_pose": "EXTRA", "is_blurred": false, "is_dark": false}], "policy_number": "\"D000000000\""}
如何生成如下所示的报告 -
image_name | image_pose |
-----------------------------------
0026568143_WS.jpg | EXTRA |
我试过了
SELECT response #>>'{image_pose_array,0}' as json
FROM abcd_abcd.table_data
where policy_number ='D017447997'
order by request_id asc;
如何从中提取键的值?
【问题讨论】:
-
如果数组包含多个对象,结果会怎样?
标签: arrays json postgresql select jsonb