I want to get value in list object in Angular.
Here is my component
getAllStories():void{
this.service.getAllStories().subscribe(
ls => {
this.StoriesList = ls;
for ( let i of this.StoriesList){
console.log(i);
console.log(i?.$Name)
}
}
)
}
This's my console log. when i show object it show exactly. but I get property of this object it show undefined.
Thanks for your help!!
You should write console.log(i?.name).