The getDetails()
method returns an Details[]
and with that array and there is a name property which I am passing to another http call
Details {
name: String;
Details
getDetails()
return this.https.get("/someValue") //this return Details[] from here I have to take name property
return
{name : hello}
Information
getInformations(name:string) {
return this.https.get("/anotherValue"+"?"+ name)
}
I am trying to first call getDetails()
and pass the name property to
Information{
Hieght:string
age:string
}
getInformations()
this.getDetails().pipe(mergeMap(x =>
this.getInformations(x.name)).subscribe((inforamtionResults:Information[])=>{
console.log("Checking Informations"+inforamtionResults.length)
return
{height:160,
age: 23
}
This is not working as x value is an array. How do iterate the array and pass the array property as parameter?