title: How to get array from multi select when submit form [AngularJS]
body: <p>I need to get array with ids when multi select box is submitted. The array should, then, look like this:</p>
  
  <pre><code>[13,14,15]
  </code></pre>
  
  <p><code>13,14,15</code> are ids inside objects...</p>
  
  <p>here is what my select box looks like:</p>
  
  <pre><code>&lt;select ng-model="groups.group" multiple="multiple" class="form-control ng-pristine ng-valid ng-touched" ng-options="group as group.name for group in groups.groups"&gt;
  &lt;option value="object:13" label="Group4"&gt;Group4&lt;/option&gt;
  &lt;option value="object:14" label="Group6"&gt;Group6&lt;/option&gt;
  &lt;option value="object:15" label="Group7"&gt;Group7&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Here is my angular code inside template:</p>
  
  <pre><code>&lt;select ng-model="groups.group" multiple="multiple" class="form-control" ng-options="group as group.name for group in groups.groups"&gt;
  </code></pre>