如三个集合:省:province,市:city,区:district
请问支持三表查询吗?
请问如何查询三个集合 返回如下格式的数据。谢谢 !
{
value: "13",
label: "福建省",
children: [
{
value: "115",
label: "福州市",
children: [
{
value: "1050",
label: "豉楼区",
},
{
value: "1050",
label: "台江区",
},
{
value: "1051",
label: "永泰区",
},
],
},
],
},
使用 lookup 进行连表查询
https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/aggregate/Aggregate.lookup.html