Can anyone assist me with an Angular 5 request?
http.get(baseUrl + 'api/Student/Students1')
.subscribe(result => {
this.std = (result as Students[]);
}, error => console.error(error));
This is the interface:
interface Students {
Address: string;
Email: string;
Phone: string;
StdName: string;
}
After placing data in std
, which is defined as public std : Students[]
, how can I access a specific object? (like accessing std[1].Email
etc.)
I would appreciate any help!