I want filter data on the Message Tabel. For filtering I used foolowing codes. How can I filter my data by personId in "MESSAGES/toPersonList/{id}/personid".
I'm not sure what exactly you're trying to achieve here, but if you're trying to filter the messages list that's not the right approach. StackOverflow would be a better forum for questions of this nature.
Version info
Angular:8.1.2
Firebase:5.5.7
AngularFire:5.4.2
Other (e.g. Ionic/Cordova, Node, browser, operating system):opera
How to reproduce these conditions
Sample data and security rules "MYDATA":![1](https://user-images.githubusercontent.com/43744978/87028545-6c7da080-c1e7-11ea-9d80-311c9ec47722.jpg)
"MY FİREBASE RULES":
"MESSAGES": { "toPersonList":{ ".indexOn": ["personId"] }
Expected behavior
I want filter data on the Message Tabel. For filtering I used foolowing codes. How can I filter my data by personId in "MESSAGES/toPersonList/{id}/personid".
Actual behavior
this.db.list(this.firebaseTableName, ref => ref.child('toPersonList').orderByChild("personId").equalTo("WOmi7o5X8Zni7WQJGaU5")).valueChanges();
For testing; I add "personId" to all levels of ""MESSAGE. But I always get empty data.