I'm studying Angular6 and what I'm trying is to obtain data from a REST API and treat them on my website. It consists in receiving an array of a player with many different fields and one of those fields is an array called transactions, what I would like to do is make a function that obtains the data from the field receiving the playerId by parameter. This API url:
Therefore, in another function, I want to collect only the data from the array transactions:
This is the code of my component:
What I want is to add another function that the playerId receives and store all the transactions in the array transactions. Many thanks in advance colleagues.