Error processing json data retrieved with fetch.

Hi, this is my first attempt to use Observable. I’m stuck with a strange behavior.
I build this notebook to explain it.

Can anyone help please ?

Json() returns a promise. Observable detects and resolves it when it’s a cell returning a promise. In your second example you need ‘then’ or an await (make enclosing function async)

Thanks for anwering, but if you meant this:
not_a_solution = fetch(“”).then(function(response) {
return response.json()
}).then(function(d) {
}).then(function(data) {
return => {return {id:, name:}})
it does not seem to work, either.
If not I did not understand where the “then” or “await” should be put.


  .then(response => response.json())
  .then(data => console.log(data));

Sorry the problem was the name was undefined.

The following works:-

does_not_work = => {return {id:, name: ? : null}})

Problem row:-

 215: Object {id: "27_945", name: null}

Great !
Thanks a lot :slight_smile: