d3.js v4: How to access parent group's datum index? : <p>The description of the <code>selection.data</code> function includes an example with multiple groups (<a href="https://github.com/d3/d3-selection/blob/master/README.md#selection_data">link</a>) where a two-dimensional array is turned into an HTML table.</p>

<p>In d3.js v3, for lower dimensions, the accessor functions included a third argument which was the index of the parent group's datum:</p>

<pre><code>td.text(function(d,i,j) {
  return "Row: " + j;
});
</code></pre>

<p>In v4, this <code>j</code> argument has been replaced by the selection's NodeList. How do I access the parent group's datum index now?</p>
