function authors(data) {
var map = {}, i = -1, n = data.length;
while (++i < n) map[data[i].author] = 1;
return d3.keys(map);
}
You can also use d3.nest to do this:
var authors = d3.keys(d3.nest()
.key(function(d) { return d.author; })
.map(data));
Of course if you want to keep the data associated with each author
then you'd remove the d3.keys and leave it as a map or entries array.
Also, you can use array.indexOf rather than jQuery.inArray; this is
standard JavaScript and eliminates a jQuery dependency.
Mike