The problem you're facing now is that when you iterate over this object you get a lot of NaN.

Solution: you can simply avoid iterating over columns or removing it from your data (if you want, but not recommended). There are several ways for removing an property from an array in JavaScript, the simpler way being this:

delete incData.columns;

To check this columns property, simply console.log(data) using D3 v3 and v4, comparing the results.

Email codedump link for Why does this vanilla js function return different results in d3v3 and d3v4