Is there group by like something in angular that can convert this sort of json data grouped under group_header.
outer list to sort data by groups and then inner list data items of that group, i couldn't make sense of this if this data can be grouped?
var data = [
{
"id":23,
"name":"Fun Run (Pre-Registration Required)",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":24,
"name":"Breakfast",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":25,
"name":"Opening Address",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 7:00 am to 1:45 pm"
},
{
"id":25,
"name":"abc",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 1:00 pm to 9:00 pm"
},
{
"id":26,
"name":"xyz",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 1:00 pm to 9:00 pm"
},
{
"id":26,
"name":"xyz",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 8:45 am to 2:00 pm" //notice a different header
},
{
"id":26,
"name":"xyz",
"date":"Wednesday Nov 12",
"group_header":"Sessions from 1:30 pm to 11:00 pm" //another different header
}
]
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<ul>
<li>Sessions from 7:00 am to 1:45 pm
<ul>
<li>Fun Run (Pre-Registration Required)</li>
<li>Breakfast</li>
<li>Opening Address</li>
</ul>
</li>
<li>Sessions from 1:00 pm to 9:00 pm
<ul>
<li>abc</li>
<li>xyz Address</li>
</ul>
</li>
<li>another custom header (no pattern to it) - sessions from 10 am to 5 pm
<ul>
<li>abc</li>
<li>xyz Address</li>
</ul>
</li>
</ul>