{
"books" : {
"-KxIQCyLuvaAE1Mv2RaF" : {
"author" : "test",
"title" : "Please work"
},
db.list('books').valueChanges().subscribe((data)=>{
//some code
})
I would like to grab the uid of a book object so that I can pass it to another component and just load that single book. I have looked everywhere, and there seems to be no easy way to do this
---EDIT--
that does not give me the keys from firebase
db.list('books').valueChanges().subscribe((data)=>{
console.log(Object.keys(data));
})
results in
[18:55:47] console.log: 0,1
I want the key: -KxIQCyLuvaAE1Mv2RaF
--EDIT 2--
I should read documentation,
.valueChanges()
strips metadata from the objects. I need
.snapshotChanges()