title: Filter an array in object by another array Vue js
body: <p>I have feed with json which has one array with object and object with objects: I am try to filter an object which is in array by another array like:</p>
  <pre><code>persons = [
      {
          id: 1,
          name: &quot;Karl&quot;
      },
      {
          id: 2,
          name: &quot;Irma&quot;
      },
      {
          id: 3,
          name: &quot;David&quot;
      }
  ]
  
  roles = {
      0: {
          id:  1,
          title: &quot;admin&quot;,    
          persons: [1,2],
          status: 
      },
      1: {
          id:  2,
          title: &quot;editor&quot;,    
          persons: [1]
      },
      2: {
          id:  3,
          title: &quot;moderator&quot;,    
          persons: [3]
      }
  }
  </code></pre>
  <p><strong>I try to get roles by person like this, but it doesn't work</strong></p>
  <pre><code>roles() {
      return this.roles.filter((el) =&gt; { 
          return this.persons.map((id) =&gt; { return id }).includes(el) 
      })
  },
  </code></pre>
  <p>get in Vue</p>
  <pre><code>&lt;div v-for=&quot;(person) in persons&quot;&gt;
      &lt;div&gt;
          {{person.name}}
      &lt;/div&gt;
      &lt;div v-for=&quot;(role) in roles&quot;&gt;
          {{role.title}}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>I would like to get a result:</strong></p>
  <pre><code>Result: 
  
      Karl
         - admin
         - editor
      Irma
         - admin
      David
         - moderator
  </code></pre>