I have the following url https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson and i want to make a http request from a service in Angular.
The data is an Object which has an array of Features. In Features, there are 4 Objects- type, properties, geometry & id. I would like to store the properties and geometry objects in their own array inside my application.
How can I do this?
The code i have in my service.ts is :
public getEarthquakeData(): Observable<any[]> {
return this.httpClient.get<any[]>(this.url);
}
I know how to call this service from my component but I am not sure how to loop through / access the data I want to save.
Any help would be greatly appreciated.
geometries: Array<Geometries>andproperties: Array<Properties>in your component./service?