Backspace
Backspace
  • 发布:2025-03-03 11:57
  • 更新:2025-03-03 21:03
  • 阅读:20

为什么支付宝云 不能查询数组对象格式的数据

分类:uniCloud

表结构

{  
    "bsonType": "object",  
    "required": [],  
    "permission": {  
        "read": true,  
        "create": true,  
        "update": true,  
        "delete": false  
    },  
    "properties": {  
        "_id": {  
            "description": "ID,系统自动生成"  
        },  
        "members": {  
            "bsonType": "array",  
            "description": "房间成员",  
            "title": "成员列表",  
            "properties": {  
                "bsonType": "object",  
                "properties": {  
                    "openId": {  
                        "bsonType": "string",  
                        "description": "用户openId"  
                    },  
                    "nickname": {  
                        "bsonType": "string",  
                        "description": "用户昵称"  
                    }  
                }  
            }  
        }  

    }  
}

数据
{
"members": [
{
"openId": "1",
"nickname": "测试"
},
{
"openId": "2",
"nickname": "测试2"
}
]
}

在JQL查询.jql输入
db.collection('list').where({
"members.openId": "1"
}).get()
为啥查询 不到数据
但是阿里云的却可以查到数据

2025-03-03 11:57 负责人:无 分享
已邀请:
hws007

hws007 - 我就是我!

db.collection('list').where("members.openId=='1'").get()

这样

要回复问题请先登录注册