Lets say I have an unordered nested list:
<ul>
<li>Item a1</li>
<li>Item a2</li>
<li>Item a3</li>
<ul>
<li>Item b1</li>
<li>Item b2</li>
<li>Item b3</li>
<ul>
<li>Item c1</li>
<li>Item c2</li>
<li>Item c3</li>
</ul>
<li>Item b4</li>
</ul>
<li>Item a4</li>
</ul>
I need to traverse it and save it in a two dimensional array (ultimately I'm just trying to convert it into a JSON entity) I am allowed to use both Jquery AND/OR Javascript. How should I proceed?
Thanks