What's the best way to create a nested list like this one from nested JSON objects (by list, I mean the < ol > tag or something custom with similar behaviour):
- Parent 1
a. Sub 1
b. Sub 2
i.Sub Sub 1
ii.Sub Sub 2
c. Sub 3 - Parent 2
As an example let's use a limit of maximum 3 "nesting levels" deep.
The JSON object that would generate this list would look like this:
[
{
"content": "Parent 1",
"children": [
{
"content": "Sub 1",
"children": [...]
},
{
"content": "Sub 2",
"children": [...]
}
]
},
{
"content": "Parent 2"
}
]