My vue component like this :
<template> ... <ul class="list-unstyled"> <li v-for="category in categories"> ... <input type="checkbox" :value="category.id" :checked="category.id in_array(categoryCountry)"> ... </li> </ul> ... </template> <script> export default { props: ['categoryCountry', 'categories'], } </script> I want to change condition in the input
categoryCountry is array, for example array(1,2,3)
So if category.id in array of categoryCountry, then it will checked
How can I do it?