getCardList() {
this.http
.get<CardList>
(BACKEND_IP + CARD_LIST)
.subscribe(data => {
console.log(data);
this.cardList = data;
console.log(this.cardList);
return this.cardList;
});
return this.cardList;
}
I get the answer from the backend:
0:
mass: (2) [25, 50]
name: "Tanks"
__proto__: Object
1:
mass: (2) [10, 15]
name: "Car"
__proto__: Object
----------
How do i get an array format
mass: (25)
name: "Tanks"
mass: (50)
name: "Tanks"
mass: (10)
name: "Car"
mass: (15)
name: "Car"
by this.cardList.map
0: mass? I think you can useflatfunction instead, this is the documentation - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…