数据仓库服务 GAUSSDB(DWS)-JSON/JSONB函数:json_each_text(object-json)

时间:2024-01-26 16:15:25

json_each_text(object-json)

描述:将对象的每个键值对拆分转换成一行两列。

返回类型:setof(key text, value text)

示例:

1
2
3
4
5
6
7
SELECT * FROM json_each_text('{"f1":[1,2,3],"f2":{"f3":1},"f4":null}');
 key |  value
-----+----------
 f1  | [1,2,3]
 f2  | {"f3":1}
 f4  |
(3 rows)
support.huaweicloud.com/sqlreference-820-dws/dws_06_0356.html