csv data formatting
February 13, 2009 3:07 PM
Subscribe
I have a large amount of csv data that I need formatted in a certain way. How do I do this?
I have a csv file with five columns, A-E. I wish to see them as a tree structure, with column A being the parent node of B, column B being parent node of C, and so on.
I need the structured in a certain way:
id:"xxxx",name:"Column A1",children:[{
id:"yyyy",name:"Column B1",data:[{key:"ColumnA1",value:"pppp"}],children:[{
id:"zzzz",name:"Column C1",data:[{key:"Column B1",value:"pppp"}],,children:[{
... etc
I need a script that will read in the csv and spit out the structure. Help?
posted by sidr to computers & internet (11 comments total)
posted by orthogonality at 3:36 PM on February 13, 2009