I know this is a shot in the dark, but here it goes. I've been trying to build an unordered list using ruby similar to the one below, but here is the catch: the data that I am receiving from an API is not in a easily parsable format.
I know that I'm going to have to use recursion, but I'm not sure how I can convert it properly into a nested (parent - children) ruby hash.
Any suggestions or references to resources to solve my issue will be greatly appreciated. Thank you for your time for reading this question.
Ruby Array
[ [ "Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12\\Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12.mp4", 3450211337 ],
[ " Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12\\video VC-1 BD TEST SAMPLE\\video VC-1 BD SAMPLE.mkv", 249150757 ],
[ " Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12\\subs idx\\English.idx", 62582 ],
[ " Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12\\subs idx\\French.idx", 43725 ],
]
Desired Unordered List
<ul>
<li>Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12
<ul>
<li>Lost in Translation 2003 BDRip 1080p AAC x264-tomcat12.mp4 - (3450211337)</li>
</ul>
<ul>
<li>video VC-1 BD TEST SAMPLE</li>
<ul>
<li>video VC-1 BD SAMPLE.mkv - (249150757)</li>
</ul>
</ul>
<ul>
<li>subs idx
<ul>
<li>English.idx - (62582)</li>
<li>French.idx - (43725)</li>
</ul>
</li>
</ul>
</li>
</ul>
Just wanted to say thank you all for the guidance and help. I used the assistance to launch a tree view of the torrent files on my site: moviemagnet.net
