d3.entries accepts objects, not arrays (but returns an array).

See example usage in the docs - https://github.com/mbostock/d3/wiki/Arrays#wiki-d3_entries.