Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
If I have the following API response, how to fetch the value player using ngFor in angular 7?
player
ngFor
<div class="col" *ngFor="let parent of summeryDetail.match_details"> <div class="text-center pt-3" *ngFor="let child1 of parent.team_a"> <h3 class="mb-0" *ngFor="let child2 of child1.teama_player">{{ child2.player }}</h3> </div>
match_details
If you want to get the list of all players i.e teama_player list so you can just:
teama_player
<div class="col" *ngFor="let obj of summeryDetail.match_details.team_a.teama_player"> {{obj.player}} </div>
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
<div class="col" *ngFor="let parent of summeryDetail.match_details"> <div class="text-center pt-3" *ngFor="let child1 of parent.team_a"> <h3 class="mb-0" *ngFor="let child2 of child1.teama_player">{{ child2.player }}</h3> </div>match_detailsis an object so this will not work!