I have a collection of checkboxes sourced from the main system object where I store all system settings (referred to as getSystem{}).
Within this form, I am retrieving information about a User, who possesses an array of roles []. How can I cross-reference this array of roles with the getSystem.user_roles?
I am familiar with accomplishing this in plain JavaScript. However, how should I approach checkbox input in terms of Vue.js?
<b-form-group>
<label for="company">Email Address</label>
<b-form-input type="text" id="email" v-model="user.email" placeholder="Enter a valid e-mail"></b-form-input>
</b-form-group>
// Here I can access user.roles to retrieve the array of roles.
// How do I iterate through the roles and mark the checkbox if it exists within the user roles??
<b-form-group v-for="resource, key in getSystem.user_roles" v-if="getSystem.user_roles">
<label>{{resource.role_name}}</label>
<input type="checkbox" [what should be placed here to compare with user.roles and mark the checkbox if present??] >
</b-form-group>