How to access the JSON attributes in typescript ?
As I am making Angular Project.
`
test:string;
response:any;
web_assign() {
this.http.get(this.url1).subscribe( e => this.response = e);
this.test = "OK";
this.t=this.response.name2;
return false;}
it is giving error on this line.
this.t=this.response.name2;
It says that it cannot read property of 'name2'