new output data structure to suit d3.js's needs

output is now an array of objects without a hierarchical order