I want to build sub menu for menu item from json data.
Menu
<div class="subnav-fixed" id="menuContrainer" runat="server">
<ul class="nav nav-pills">
<li id="Li0"><a href="Default.aspx">Home </li>
<li id="Li1"><a href="InitiativeGrid.aspx">Initiative</a></li>
<li id="Li2"><a href="Reports.aspx">Reports</a></li>
<li id="Li3"><a href="EditInitiative.aspx">Edit Initiatives</a></li>
</ul>
</div>
JSON
data =
"{"d":[
{"__type":"Tableau_Reports:#CostReductionData",
"ClientIdx":1,
"GroupName":"HR",
"ReportGroup":"1",
"ReportHeight":"800",
"ReportName":"Baseline Vs Active Employees",
"ReportOrder":"0",
"ReportUrl":"https://company.com/t/sga/views/HRReports/BaselineandActiveEmployees"
},
{"__type":"Tableau_Reports:#CostReductionData",
"ClientIdx":1,
"GroupName":"HR",
"ReportGroup":"1",
"ReportHeight":"800",
"ReportName":"Level vs Direct Reports",
"ReportOrder":"0",
"ReportUrl":"https://company.com/t/sga/views/HRReports/LevelvsDirectReports"
},
{"__type":"Tableau_Reports:#Alixpartners.SGACostReductionData",
"ClientIdx":1,
"GroupName":"Finance",
"ReportGroup":"2",
"ReportHeight":"800",
"ReportName":"Spans and Layers",
"ReportOrder":"0",
"ReportUrl":"https://company.com/t/sga/views/HRReports/SpansandControl"
}]
}"
I want to display sub menu for Report menu Item like this
Home Initiative Reports Edit Initiative
|
HR- Baseline Vs Active Employees
- Level vs Direct Reports
|
Finance - Spans and Layers
How can we do this with Jquery?