Hi I have some html and i need to get html into JSON Array using jQuery with lambda expression.
<div id="main">
<ul class="level_0">
<li>A
<ul class="level_1">
<li>a</li>
<li>b</li>
<li>c</li>
</ul></li>
<li>B</li>
<li>C</li>
</ul>
</div>
I want JSON Array like
[{
'A',
{'a','b','c'},
'B',
'C'
}]
I'm trying like this
var m= f = (d)=> $(d).children().length>0 ? $(d).html(): f($d)