Just like doing shapshot.val()
is there any attribute to achieve this ?
Asked
Active
Viewed 36 times
0

alessandrio
- 4,282
- 2
- 29
- 40
-
I think this topic headline would be more clear "How to convert an object, returned from Polymer's firebase-document, into array?" – Vladimir Ignatev May 26 '17 at 06:28
-
I'd just like to add that there is the element firebase-query wich specialize at bringing data as an array. – Arfost Jun 09 '17 at 13:03
1 Answers
0
If you want to just convert those number keys into array, you can simply do:
var arr = [];
for(var i in obj) {
arr.push(obj[i]);
}
where obj
is object returned from firebase-document
and arr
is the result

Kuba Šimonovský
- 2,013
- 2
- 17
- 35