I'm consuming an object from an api like this.
I can get the data but cant get the ChildSimpleProducts Array exclusively.
here is the product.service function
getProducts = (): Observable<IProducts[]> => this.http.get<IProducts[]>(`${this.apiUrl + this.productsUrl}`);
and here is the component function
data: any = [];
productsArray: Observable<IProducts>[];
getProducts() {
this.productService.getProducts().subscribe(data => {
this.data = data;
this.productsArray = data["$values"];
console.log(this.productsArray)
})
}
i have tried a few things but keep getting undefined and undefined objects
