How to iterate through nested firebase objects.
Publications-
|
|-Folder1------
| |-hdgjg76675e6r-
| | |-Name
| | |-Author
| |
| |+-hdgjdsf3275e6k
| |+-hd345454575e6f
|+-Folder2
In publications I have folders and in folders I have objects (containing properties like. Name, Author)
I have iterated through folders till now.
snapshot.forEach(function (snapshot) {
var key = snapshot.key();
var obj = snapshot.val();
console.log(key);
//output => Folder1 , Folder2 etc
});
When I print obj
console.log(obj);
It displays
How do I iterate through obj variable as it contains hdgjg76675e6r
, hdgjdsf3275e6k
etc and further?