- 
      
 - 
        
Save myndzi/4783a45d105bee004c2c to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | return [ | |
| 'actor', | |
| 'director', | |
| 'writer', | |
| 'producer' | |
| ].reduce(function (persons, role) { | |
| var list = movie[role+'s'].list; | |
| var newPersons = list.map((person) => { | |
| return { | |
| url: 'http://watch.nowtv.com/search?' + QueryString.stringify({query: person.name}), | |
| name: person.name, | |
| role: role | |
| }; | |
| }); | |
| return persons.concat(newPersons); | |
| }, [ ]); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment