firestore snapshot data to array code example
Example 1: firebase snapshot to array
var ref = firebase.database().ref().child('/scenes/' + projId).orderByChild('wordcount');
ref.once('value',function(snap) {
snap.forEach(function(item) {
var itemVal = item.val();
keys.push(itemVal);
});
for (i=0; i < keys.length; i++) {
counts.push(keys[i].wordcount);
}
});
Example 2: firebase snapshot to array
key: string | null;