title: matching 2 arrays in Angular, with matches as checkboxes
body: <p>I want to be able to manage User roles in Angular webpage. I have one object which lists all the current roles in the system. </p>
  
  <p><a href="https://i.stack.imgur.com/TBiFg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TBiFg.png" alt="enter image description here"></a></p>
  
  <p>Then based on the a User, I can get his current role in the role. </p>
  
  <p><a href="https://i.stack.imgur.com/c6CDk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c6CDk.png" alt="enter image description here"></a></p>
  
  <p>I can list all the roles as checkboxes, then i want to have the user's checkbox selected based on role. E.g. if he is Reporter and Public, I want those checkbox's selected. </p>
  
  <pre><code>  &lt;label ng-repeat="m in UserDetails"&gt;
              &lt;input type="checkbox" ng-model="UserDetails[m]" /&gt; {{m}}
    &lt;/label&gt;
  </code></pre>
  
  <p>In the <code>UserDetails</code> I have all the roles listed. I want the checkboxes selected. </p>