Reputation: 357
i'm trying to get data from firebase and i'm little stuck with that.
i'm trying to get the all SemaA data i did it like that but it not give me nothing
firebase.database().ref('Courses/'+departmentId+'/SemA'),
i can specific to do (but i don't want it)
firebase.database().ref('Courses/'+departmentId+'/SemA/java'),
i also wnated to get the black sign and red sign in two different queries and run into loop to get the data from there
Upvotes: 0
Views: 1676
Reputation: 599571
If you're looking to loop over the courses in a semester:
var semesterRef = firebase.database().ref('Courses/'+departmentId+'/SemA')
semesterRef.on('child_added', function(courseSnapshot) {
console.log(courseSnapshot.key);
});
Upvotes: 2