In that callback you are not checking if there is an error.

If there is an error, data will be undefined.

If you were to do something like this:

d3.json("__url__", function(error, data){
    if(error){ console.log("There was an error", error); }
        console.log("Here is your data: ", data);

You can see if there is an error, and as long is there not one, then you can access the data object.

Hope this helps.

Related Query