database.ref().once("value", function (snap) {
scores = snap.val();
console.log(scores);
console.log(scores[1]);
});
scores is an array of JSON objects taken from a firebase database.
However, I cannot access the objects inside the array.
I assume that scores[1] would print.
-L1qn0mBwpny-7FVzlCF : {Name: "Josh", Score: 9}
But it prints undefined.

scores['-L1qn0mBwpny-7FVzlCF']