我有一个带有以下数组的 json 列:
[
{
"id": "24276e4b-de81-4c2c-84e7-eed9c3582a31",
"key": "id",
"type": "input",
},
{
"id": "e0ca5aa1-359f-4460-80ad-70445be49644",
"key": "name",
"type": "textarea",
}
]
我尝试了以下查询以获取文档列中具有 id 的行24276e4b-de81-4c2c-84e7-eed9c3582a31
,但它不返回结果:
select * from jobs WHERE document->'$[*].id' = "24276e4b-de81-4c2c-84e7-eed9c3582a31"
有人知道如何进行正确的查询吗?