小编Avi*_*ash的帖子

如何从数组中的postgresql json数组字段获取数据

下面是列名元和表名层中的 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, …
Run Code Online (Sandbox Code Playgroud)

postgresql json

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

json ×1

postgresql ×1