var optionList = [
    {
        'label': 'HTML',
        'value': 'html'
    },
    {
        'label': 'Plain Text',
        'value': 'plaintext'
    }
];
console.log(optionList.find(option => option.value === 'html'));
          Created
          April 12, 2016 21:43 
        
      - 
      
- 
        Save trey/3a5c3cafe0e44e3674683396a0bd7993 to your computer and use it in GitHub Desktop. 
    Find an object by a value in a JavaScript array.
  
        
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
This is a Solutions Log post.