I'm using AngularFire 2, a Firestore database and Angular5/6. I want to search a string, nested in collections and documents and get the parent-document.
Let's say I want to search the message "Hello World!", which is nested in
rooms > roomA > messages > message1.msg
and then get back the name of the chatroom roomA.name = "my chat room"
Is that even possible? Because I don't know which room even contains the message "Hello World!". It can be roomA / roomB, so no defined document... Also: I don't know which message contains the "Hello World".
So the path would look like rooms/*/messages/*.msg
? But how can I do a query on a path like that?
let query = afs.collection('rooms', ref => ref.where('???', '==', 'Hello World!')).valueChanges();