I have code like this

```
<div class="form-group">
    <div class="alert alert-success" v-if="alert_permission">Izin telah diberikan</div>
        <template v-for="(row, index) in permissions">
            <input
              type="checkbox"
              class="flat-red new-select"
              :key="index"
              :checked="row.name == user_permissions[index].name  ? 'checked' : ''"
              :value="row.name"
              @click="addPermission(row.name)"
            />
            {{ row.name.charAt(0).toUpperCase() + row.name.slice(1) }}
            <br :key="'row' + index" />
            <br :key="'enter' + index" v-if="(index+1) %3 == 0" />
        </template>
    </div>
</div>

```

In my case, I want to checked checkbox when `row.name` is same with data model in array object.
but if write like `user_permissions[0].name` thats work on 1 item only. 

How can i use index in that case?

permissions data like

```
[{"id":1,"name":"add course","guard_name":"web","created_at":"2019-10-07 05:30:05","updated_at":"2019-10-07 05:30:05"},{"id":2,"name":"edit course","guard_name":"web","created_at":"2019-10-07 05:30:05","updated_at":"2019-10-07 05:30:05"},{"id":3,"name":"add class","guard_name":"web","created_at":"2019-10-07 05:30:05","updated_at":"2019-10-07 05:30:05"},{"id":4,"name":"edit class","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":5,"name":"delete class","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":6,"name":"add information","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":7,"name":"edit information","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":8,"name":"delete information","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":9,"name":"add score","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":10,"name":"edit score","guard_name":"web","created_at":"2019-10-07 05:30:06","updated_at":"2019-10-07 05:30:06"},{"id":11,"name":"delete score","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":12,"name":"edit user","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":13,"name":"delete user","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":14,"name":"add category","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":15,"name":"edit category","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":16,"name":"delete category","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":17,"name":"add module","guard_name":"web","created_at":"2019-10-07 05:30:07","updated_at":"2019-10-07 05:30:07"},{"id":18,"name":"edit module","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":19,"name":"delete module","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":20,"name":"add presence","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":21,"name":"edit presence","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":22,"name":"delete presence","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":23,"name":"view course","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":24,"name":"view module","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08"},{"id":25,"name":"view score","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09"},{"id":26,"name":"view presence","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09"},{"id":27,"name":"view category","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09"},{"id":28,"name":"view information","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09"},{"id":29,"name":"upload task","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09"}]

```

my user\_permissions data like this

```
[{"id":23,"name":"view course","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08","pivot":{"role_id":3,"permission_id":23}},{"id":24,"name":"view module","guard_name":"web","created_at":"2019-10-07 05:30:08","updated_at":"2019-10-07 05:30:08","pivot":{"role_id":3,"permission_id":24}},{"id":25,"name":"view score","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09","pivot":{"role_id":3,"permission_id":25}},{"id":26,"name":"view presence","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09","pivot":{"role_id":3,"permission_id":26}},{"id":27,"name":"view category","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09","pivot":{"role_id":3,"permission_id":27}},{"id":28,"name":"view information","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09","pivot":{"role_id":3,"permission_id":28}},{"id":29,"name":"upload task","guard_name":"web","created_at":"2019-10-07 05:30:09","updated_at":"2019-10-07 05:30:09","pivot":{"role_id":3,"permission_id":29}}]

```