下面是列名元和表名层中的json数据。 在这里,我检索'网页'键的元数据 - >'网页'的数据,但我不知道如何获得'lable'键值,这是一个数组元素的'字段',这又是一个数组页面。如何从数组中的postgresql json数组字段中获取数据
{
"id":1,
"name":"org_details",
"action":"organisation.php",
"lable":"Manage Organisation",
"pages":[
{
"name":"Create Org",
"lable":"Organisation Name",
"fields":[
{
"id":11,
"type":1,
"subtype":1,
"lable":"Organisation Name"
},
{
"id":12,
"type":2,
"subtype":1,
"lable":"Description",
"mandatory":TRUE,
"validations":{
"minl":2,
"maxl":60
}
},
{
"id":13,
"type":3,
"subtype":1,
"lable":"Org. Type",
"default value":1,
"mandatory":TRUE,
"choices":[
{
"lable":"OFSDP",
"value":1
},
{
"lable":"AGRICULTURE",
"value":2
},
{
"lable":"HUTICULTURE",
"value":3
}
]
},
{
"id":14,
"type":4,
"lable":"checkbox",
"default value":1
},
{
"id":15,
"type":5,
"subtype":1,
"lable":"Upload",
"mandatory":TRUE
},
{
"id":16,
"type":6,
"subtype":1,
"lable":"GIS"
},
{
"id":17,
"type":7,
"subtype":1,
"lable":"Date"
},
{
"id":18,
"type":8,
"lable":"Attachment"
}
]
}
]
}
Postgre文档是我见过的最好的。 JSON页面在这里。 https://www.postgresql.org/docs/current/static/functions-json.html – Mokadillion
是的,我读了那些,但无法得到它。 – Avinash
我的postgres不接受'TRUE',只好用'“TRUE”或'true'替换它。 – Andomar