I want to extract only 'phaseValue' part from below json and store that into array.
{
"templateName":"TemplateExample",
"phaseExecutions":{
"PRE":[
{
"phaseType":"text",
"phaseValue":"enter your name"
},
{
"phaseType":"number",
"phaseValue":"enter your mobile number"
},
{
"phaseType":"email",
"phaseValue":"enter your email"
}
]
}
}
Above data I am getting from below code
getTemplateByName():any
{
this.httpService.get('http://localhost:57611/Api/Employee/GetTemplateByName/'+this.selectedTemplate).subscribe(
data => {
this.templateInJsonFormat = data;
this.getTemplateFromSubscribe(this.templateInJsonFormat);
}
);
}
getTemplateFromSubscribe(temp:any)
{
this.finalTemplateFromSubscribe = temp;
console.log(this.finalTemplateFromSubscribe);
}
I am using typescript 3.5.3. Please help.