I have the following code which returns an observable with the item details for each item key:

```
this.list = this.af.database.list("API_URL")
      .map((ItemKeys) => {
        return ItemKeys.map((ItemKey) => {
          return this.af.database.object(API_URL + "/" + ItemKey); //I need this as the object (not observable)
        });
      }).subscribe((items) => {
        this.lineData = items; //A list of observables
      });

```

The code itereates over each item key and gets the item data from another endpoint. The problem is that it retruns an observable of each item data, and I need it in an object (the observable result).

I tried to return the subscription result with the following code, but then all my items data are empty (undefined):

```
this.list = this.af.database.list("API_URL")
      .map((ItemKeys) => {
        return orderItemKeys.map((ItemKey) => {
          this.af.database.object("API_URL" + "/ItemKey.$key) // So I tried to subscribe to this..
          .subscribe((data) => {
            return data;
          });
        });
      }).subscribe((items) => {
        this.lineData = items; // A list with undefined items
      });

```

How I can return the item data object as an object and not as observable of an object in my case?