Hey everyone, I'm a beginner in Angular and RxJS coming from a background in VueJS. I've been struggling to grasp the inner workings of RxJS and would really benefit from some guidance from more experienced individuals regarding my current issue.
What I aim to achieve: I am using the nomics API(see link below) to fetch data which is returned as an array of objects. While I know how to easily display all objects on my component, I'm facing a challenge when it comes to selecting a specific object based on one of its properties. For instance, "loop through each object in the array until I find the object where object.Currency == 'BTC' ". Currently, I am able to retrieve all data and display it successfully. Can anyone show me how to filter the data based on a condition related to one of the objects?
API Link:
My code:
getDashboard() {
return this.http.get(`${this.apiUrl}/dashboard?key=${this.apiKey}`).pipe(
map(result => {
console.log(result);
// Here I need help to extract the object with a specific property in Object.Currency
// For example, iterate through objects until currentObject.Currency== 'Some string'
})
)
}