I want to be able to use a single value from of an Real Time Database (RTD) entry. With Firestore I was able to use the following code:

```
interface Led{
  currentState: boolean,
  lightSensor: number
}

currentState: boolean;
lightSensor: number;

this.afs.collection('Led').valueChanges().subscribe((Led: any) => {
  this.lightSensor = Led[0].lightSensor;
  this.currentState = Led[0].currentState;
})

```

I was then able to call currentState or lightSensor in to HTML and display the values. All the examples I can find for RTD use ngFor and display JSON data, i have no idea how to get the single value out of this data. I have tried the following which is essentially copied from my Firestore code:

```
this.db.list('leafBox001').valueChanges().subscribe((Led: any) => {
  this.currentState = Led[0].currentState;
  console.log(this.currentState);
});

```

Console log returns undefined.