Question: I'm trying to get the currently displayed `ViewController` using the following:

```
let currentViewController = UIApplication.sharedApplication().keyWindow!.rootViewController?.presentedViewController

```

This property gives me the `TabBarController`. The only property after `presentedViewController` is "`childViewControllers`".

How could I use this to attain the currently displayed `ViewController`?

Answer: 
I would use a computed property instead of a filter and a method.

I'd go through each cast member and if any of their groups is in `selected_groups` I'd allow it through the filter. I'd so this using `Array.some`.

```
results: function() {
  var self = this
  return self.cast.filter(function(person) {
    return person.groups.some(function(group) {
      return self.selected_groups.indexOf(group) !== 1
    })
  })
},

```

Here's a quick demo I set up, might be useful: <http://jsfiddle.net/crswll/df4Lnuw6/8/>
```js
var demo = new Vue({
    el: '#demo',
    data: {
        search: 're',

        people: [
          {name: 'Koos', age: 30, eyes:'red'},
          {name: 'Gert', age: 20, eyes:'blue'},
          {name: 'Pieter', age: 12, eyes:'green'},
          {name: 'Dawid', age: 67, eyes:'dark green'},
          {name: 'Johan', age: 15, eyes:'purple'},
          {name: 'Hans', age: 12, eyes:'pink'}
        ]
    },
    methods: {
      customFilter: function(person) {
          return person.name.indexOf(this.search) != -1
          || person.eyes.indexOf(this.search) != -1
          ;
      }
    },

})

```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js"></script>
<div id="demo">
    <input type="text" class="form-control" v-model="search"/>

    <br/>
    <table class="table">
      <thead>
        <tr>
          <th>name</th>
          <th>eyes</th>
          <th>age</th>
        </tr>
      </thead>
      <tr v-for="person in people | filterBy customFilter">
        <td>{{ person.name }}</td>
        <td>{{ person.eyes }}</td>
        <td>{{ person.age }}</td>
      </tr>
  </table>
</div>

```