Published
Edited
Dec 30, 2020
Insert cell
Insert cell
Insert cell
fetched_data = fetch("https://cors-anywhere.herokuapp.com/http://sdmx.istat.it/SDMXWS/rest/dataflow?format=jsonstructure").then(function(response) {
return response.json()
}).then(function(d) {
return d.data.dataflows
}
)

Insert cell
Insert cell
works = fetched_data.map(e => {return {id: e.id, name: e.name}})
Insert cell
Insert cell
Insert cell
does_not_work = fetched_data.map(e => {return {id: e.id, name: e.name.en}})
Insert cell
Insert cell
[{id:33, name: {en: "AAA"}}, {id: 35, name: {en: "BBB"}}].map(function(e) {return {id: e.id, name: e.name.en}})

Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more