title: How to filter array of objects by object property in VueJS
body: <p>I want to print out the movies that have time sessions that start after the hour 20 or the same day. Either way, I can't get it to work.</p>
  
  <p>Component data structure:</p>
  
  <pre><code>day:"2017-06-08T18:34:27.211Z"
  movies:Array[8]
  0:Object
     Description:"orphan the becomes a famous magician "
     id:1
     movieName:"Harry Potter "
     time_session:Array[3]
       0:Object
         id:1
         pivot:Object
         time:"2017-06-14 00:00:00"
       1:Object
       2:Object
  1:Object
  2:Object
  3:Object
  4:Object
  </code></pre>
  
  <p>Template: </p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt; 
      &lt;li v-for="movie in filteration(movies)"&gt;{{movie.movieName}}&lt;/li&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>How can I filter the movies so that the movies displayed depend on the time sessions in that same Object?</p>
  
  <p>Here's what I've tried:</p>
  
  <pre><code>&lt;script&gt;
    export default{
      data() {
        return {
          movies:[],
          day:moment()
        }
      },  
      mounted(){
        axios.get("/fa")
          .then(response  =&gt; this.movies = response.data);
      },
      methods:{
        filteration(movie){
          return movie.filter(this.time);
        },
        time(movie){
          return moment(movie.time_session.time).hour() &gt; 20;
          // return moment(movie.time_session.time).isSame(this.day,'day');
        }    
      }
    }     
  &lt;/script&gt;
  </code></pre>