memberIdswill be Object- not a Array- so you cannot list it with forEach. However, you can access it as a snapshot using child:
alignmentsRef
.once('value')
.then(function (snapshot) {
snapshot.forEach(function (k) {
k.child('downvotes').forEach(function (d) {
console.log(`${d.key} = ${d.val()}`);
});
});
source
share