Im currently working on a Project with Angular 2 and angularFire2. My database looks like this in Firebase: base:/data
[{Name:test1},
{Name:test2},
{Name:test3}]
All of the items also have the Firebase key.
Now im trying to get data out of the Firebase with the Observabels from RX. When i do this, i get the names in the Console:
let items= af.database.list('/data').map(i=>{return i});
items.forEach(i=>i.forEach(e=>(console.log(e.name))));
Output: test1,test2,test3. Everything Works.
But when i do this:
console.log(items.first());
I get a FirebaseListObservable back.
How can i get only the First Object from the FirebaseListObservable? How can i edit Items in the list? like:
items[0].name=test3
And How can i get the Firebase Key from an Item
how can i get The firebaseKey from an Item in the list?