I have the following structure:
i have a profile id, and i want to retrieve all projects that contains that profileId.
this is my code:
var campaignRef = this.db.app.database().ref('Campaign');
var projectsRef = campaignRef.child('Projects');
var projects = projectsRef.orderByChild('profileId').equalTo(userId).once("value", (snap) => {
console.log(snap.val());
});
the "userId" is valid and existing but i just get null...
and how can i return a list of "FirebaseListObservable" containing those projects.. (or a snapshot of them)
Thanks!