I have an array of objects from an API. see image
and in my game.component.ts I tried to access to an array inside the main game array but I can't access to platforms name(array7) with typescript.
constructor(
private gamesService:GamesService,
private router: Router,
) {
this.game = new Game('', '', [], '', [], 1 );
console.log(this.game);
this.gamesService.getListGames(this.page).subscribe( (data: any) =>{
//console.log(data.results);
console.log(data);
this.gameslist = data.results;
//this.count = data.results.length;
console.log(this.count);
//this.nextpage = game.next;
console.log(this.nextpage);
console.log(data.results);
if(data.platforms == 'PC')
{
return this.pcIcon= '../assets/pc.png';
}
});
how to access to platforms.name in console.log(data.results " platform name" ????
to print in the console.log the platforms name of an object game, each game has various platforms name.
I am looking for the platforms name in typescript for later get an .png image for each platform.

