【发布时间】:2021-02-22 16:38:56
【问题描述】:
我在表 src 中有以下行,其中一个属性是 JSON 数组。
属性:
[{"key": "Tag", "value": "myTagValue"}, {"key": "Brand", "value": "myBrandValue"}]
[{"key": "Tag", "value": "myTagValue"}, {"key": "Brand", "value": "myBrandOtherValue"}, {"key": "Test", "value": "123"}]
如何选择Brand?
预期输出:
Brand
-----
myBrandValue
myBrandOtherValue
(2 rows affected)
我在考虑使用json_to_recordset(json) 函数,但属性可以有N 不同的值(jsons)。
【问题讨论】:
-
这是一个 JSON 数组
json[]还是一个 JSON 数组?
标签: arrays json postgresql