Tencent / APIJSON

🏆 实时 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构 🏆 Real-Time coding-free, powerful and secure ORM 🚀 providing APIs and Docs without coding by Backend, and the returned JSON of API can be customized by Frontend(Client) users
http://apijson.cn
Other
17.27k stars 2.16k forks source link

【分组数据结构问题】 #731

Closed CarsonYue closed 5 months ago

CarsonYue commented 5 months ago

Description

入参:

{
  "[]": {
    "ValueAddedBusinessRecord": {
        "@column":"station_name",
        "@group":"station_name"
    }
  }
}

出参:

{
    "[]": [
        {
            "ValueAddedBusinessRecord": {
                "station_name": "电站1"
            }
        },
        {
            "ValueAddedBusinessRecord": {
                "station_name": "电站2"
            }
        }
    ]
}

怎么做到出参展示:

{
    "[]": [
        {
            "ValueAddedBusinessRecord": {
                "station_name": ["电站1","电站2"]
            }
        }
    ]
}
TommyLemon commented 5 months ago

ValueAddedBusinessRecord-station_name[] 提取字段,可以返回更简单易用的结构