Hi,

I have the following HTML:

<ul>
    <li>
        <div>Something</div>
        <ul>
            <li>
                <div>Something</div>
                <ul>
                    <li>
                        <div>Something</div>
                        //more lists can come
                    </li>
                    <li>
                        <div>Something</div>
                    </li>
                </ul>
            </li>
            <li>
                <div>Something</div>
            </li>
        </ul>
    </li>
    <li>
        <div>Something</div>
    </li>
</ul>

The list can continue endlessly and the count of sublist is unknown (user defined). Is there a way to convert this into a JSON format string?

Thanks

There isn't! (At least not theoretically).
Practically? There is!
- But the method chosen for conversion will have to be idiomatic. Therefore not understood by anybody else unless canonized and learned by other parties of same interest.

How do you get the list there in the first place? Is it just hard coded? Are you building it from an ajax call?