So I've been working in advanced queries with firebase and ionic, I have a data structure like this one:
I have several users in the profile branch, and I want to get a list of the users who have a given "asignatura" saved in the profile. For example if the parameter is algebra, then I'll get all the users who have algebra saved in the node asignaturas.
I have something like that in my code but i know it isn't working:
this.tutores = this.afDatabase.list(`profile`,{
query:{
orderByChild: 'asignaturas',
equalTo: asignatura
}
});
I'm not sure how to iterate inside the inner node.
I'd apreciate any help or suggestions