The quick and dirty way to do this is to define a second line generator that extracts the data for the other line.

var line2 = d3.svg.line()
  .x(function(d,i) {
    return x(d.created_at); 
  .y(function(d) {
    return y(d.ranking[1][1]); 

Then all you need to do to draw the line is something like this.

graph.append("svg:path").attr("d", line2(json)).style("stroke", "red");

Complete example here.

Related Query

More Query from same tag