title: How to find elements in an array in vuejs or Javascript
body: <p>I'm having an array of elements in <code>vuejs</code>, I've some data manipulation with them Like I've a select dropdown which shows the company information and each company information has a tag. Tags are of one sub level, I've joined both the tags as one and stored in database, whenever I select the parent company I want these tags to be selected, I mean it should have class <code>btn-warning</code> and rest all to be <code>btn-primary</code> don't be confused with other select, there options are coming from the filter of first select</p>
  
  <p>So suppose my tag data value is: <code>Investor-Mutual fund</code>, it should split up and <code>Investor</code> button should be selected and <code>Mutual Fund</code> button should have class of <code>btn-primary</code> and this should be changeable only with the select list only</p>
  
  <p>Here's my code pen: <a href="https://codepen.io/anon/pen/eWXPaK?editors=1010" rel="nofollow noreferrer">https://codepen.io/anon/pen/eWXPaK?editors=1010</a></p>
  
  <p>This will give you idea what I'm trying to do. Guide me</p>