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

时间:2024-11-28 17:39:01

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-830-dws/dws_06_0356.html