79327223

Date: 2025-01-03 17:36:21
Score: 1
Natty:
Report link

I believe you can simply use

{
  "rules": {
    "chats": {
      "$chatid": {
        "participants": {
          ".indexOn": ".value"
        }
      }
    }
  }enter code here
}

in database rules and then in your code use

ref.child("chats").orderByChild("participants/john").equalTo(true)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mohammed Hussein