I want to retrieve json data from this url http://mindicador.cl/api. But specifically I want to retrieve all objects like "uf", "ivp" and so on in order to then show them in a table or list. Unfortunately, there are no in array format so How can Iterate over there?
{
"version": "1.5.0",
"autor": "mindicador.cl",
"fecha": "2018-10-24T17:00:00.000Z",
"uf": {
"codigo": "uf",
"nombre": "Unidad de fomento (UF)",
"unidad_medida": "Pesos",
"fecha": "2018-10-24T04:00:00.000Z",
"valor": 27413.56
},
"ivp": {
"codigo": "ivp",
"nombre": "Indice de valor promedio (IVP)",
"unidad_medida": "Pesos",
"fecha": "2018-10-24T04:00:00.000Z",
"valor": 28523.73
}
}
And I want to iterate through all objects, that is, "uf", "ivp", and so on. How can I do it? It's not an array so I can't use map I guess.
This is my service's method:
search(): Observable<Object> {
const queryUrl = this.apiUrl;
return this.http.get(queryUrl);
}