I am new to Ionic. I want to access the a particular value from WordPress rest API.
I want to access this value from api. title:
rendered: "04:00 PM – 07:00 PM"
.ts file
viewTime(){
let url = '';
this.http.get(url, this.config.options)
.map(res => res.json())
.subscribe((response: any) => {
console.log(response)
console.log(response.title)
}, (err) => {
let alert = this.alertCtrl.create({
title: 'Error',
subTitle: 'Please check your credentials',
buttons: ['OK']
});
alert.present();
});
}
But console.log(response.title) gives undefined.