title: How to filter array of objects in Javascript
body: <p>I am trying to create a function in Javascript, that will allow me to filter the skills which the different candidates have, i have been told that this can be done in Javascript, the function called "filterCandidateBySkill" is where i want to filter the candidates skills, but ive had a look of this and as the skills is in an array i cant find anywhere online how to filter it. a lot of them have filters for single words, but not for arrays. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const newCandidates = [
    { name: "bob", skills: ["JavaScript", "Docker", "Ruby"] },
    { name: "ally", skills: ["Python", "AWS"] },
    { name: "joe", skills: ["JavaScript", "Azure"] },
    { name: "fred", skills: ["JavaScript", "Java"]},
  ];
  
  function filterCandidateBySkill(candidates, skill) {
    // where im confused
  }</code></pre>
  </div>
  </div>
  </p>