I recently came across this pre-existing JSON data that I am unable to change:
{"tags": [
{
"title": "news",
"options": [
{
"title": "important",
},
{
"title": "less important",
}
]
},
{
"title": "entertainment",
"options": [
{
"title": "entertainment",
}
]
}
My goal is to present this data in a list format, where titles with only one option should be displayed as-is, and titles with multiple options should show both the main title and its corresponding options. For example, based on the provided JSON, the desired output would be:
<ul>
<li>news<ul>
<li>important</li>
<li>less important</li>
</ul>
</li>
<li>entertainment</li>
</ul>
I am looking for a way to achieve this outcome using angularJS. Any suggestions or guidance would be greatly appreciated.