score:2

Accepted answer

You can filter a selection:

var myLink = d3.selectAll(".link")
             .filter(function(d) { return d === linkData[3]; })
             .attr('stroke', 'red');

Or, better still, as LeartS suggested, you can directly filter the link without whisking through the .data() from the DOM:

var myLink = d3.selectAll(".link")
             .filter(function(d) { return isThisTheLinkIWant(d); })
             .attr('stroke', 'red');

Related Query