I currently have checkboxes that the user can choose between which then are sent to my model,
<div ng-repeat="option in roleOptions">
<input type="checkbox" value="{{option.Id}}" ng-model="user.Roles[option.Id]">{{option.Name}}
</div>
The problem is that this produces a result like this,
{
0: 'a',
1: 'b',
2: 'c'
}
Whereas I want an output like this,
['a','b','c']
I realise that I could just convert them after, but I'd really like to change my html in some way so that it maps straight to an array, because I will also be sending this data in an array format to the html as well so I don't want to have to keep converting all the time.
Any ideas?