title: How to convert an object or any type from observable which returns an array of objects to an array of objects..?
body: <p>I Need to manipulate an array to get the data that i wanted, the flow is , Backend java returns an array of objects, angular gets the data and return as an observable from a service. Then subscribing to the observable method and looping through the data.</p>
  
  <p>I have an interface structure same as the one from java object, looping through the data and push the values to an empty array of that interface type.</p>
  
  <p>The problem here is logging of data gives a correct array output but when i use any array methods on the data it shows undefined.</p>
  
  <pre><code>this.service.getByd(d).subscribe(dataList =&gt; {
  
      for (let key in dataList) {
        if (dataList.hasOwnProperty(key)) {
          this.event.push(dataList[key]);
        }
      }
    },
    err =&gt; {
      console.log(err);
    });
  
  console.log(event) //expected output
  console.log(event[0].eventType) //undefined
  </code></pre>