I'm trying to do a group by for a select element with angular js,starting from this json file:
[ { city:'Casacanditella', region: 'Abruzzo' ,
id: 19,name: 'museo prova' },
{ city'Archi', region: 'Abruzzo',
id: 20,name: 'Museo aperto' }]
What I want is to have the element displayed in this way
- Region
- City
- Name
- City
so grouped by region and then by city. How can i do it ? I've tried to do something like this
ng-options="m.museumName group by (m.region and m.city ) for m in museum"
It's obviously wrong,but in practice is what I expect to see. Thanks in advance for the help!