added support for structured data (array of map)

added support for structured data (array of map) in addition to string as csv input. now it also works with d3.js csv

The block inside  if(!Array.isArray(input)) {} should be exactly the same as what it was before.