Closed pakal closed 8 years ago
Before I answer your question, I want to make sure I understand it first.
You want to turn the current example:
table == [{"First Name"=>"Jill", "Last Name"=>"Smith", "Score"=>"disqualified"},
{"First Name"=>"Eve", "Last Name"=>"Jackson", "Score"=>"94"},
{"First Name"=>"John", "Last Name"=>"Doe", "Score"=>"80"},
{"First Name"=>"Adam", "Last Name"=>"Johnson", "Score"=>"67"}]
Into:
table == {"First Name"=>["Jill", "Eve", "John", "Adam"],
"Last Name"=>["Smith", "Jackson", "Doe", "Johnson"],
"Score"=>["disqualified", "94", "80", "67"]}
Right? Are you going to be using Table-to-json on a website that you own and can modify?
Closing this issue due to inactivity
hint use lodash or underscore for transformations
Currently, tabletojson follows the row-oriented approach of HTML ; what's the easiest path if one wants to convert a table column by columb first, by keeping the behaviour of the plugin intact (auto extraction of hash dicts from first row/col etc.) ?
Can it be done by preprocessing or post-processing the data ? Or does it require a heavy evolution of the plugin (I don't easily see, with the current code, how much work it asks for) ?