title: Compare a string in an array with a string after the array in the filter method
body: <p><code>competences['asset']['id']</code>  return me string in array <code>['123']</code>;
  <code>select[0]</code> return me string <code>'123'</code></p>
  
  <p>How  compare the string in the array with the string after the array so that it is on one line</p>
  
  <pre><code>.filter (obj =&gt; obj [" competences "]. map (competences =&gt; competences ['asset'] 
        ['id']) !== [select[0]]) // ['234']! = = '234
  </code></pre>
  
  <p>I'm trying to get inside the array: </p>
  
  <pre><code>obj["competences"].map (competences =&gt; competences['asset']['id'][0])
  </code></pre>
  
  <p>but this returns the first character of the string for me.</p>
  
  <p>Code here: <a href="https://stackblitz.com/edit/react-lwyqns" rel="nofollow noreferrer">https://stackblitz.com/edit/react-lwyqns</a></p>
  
  <pre><code>const people = [
    {
      'firstname': "Paul",
      'id': "12345", 
      'competences': [
        {'asset': {
            'name': "Paul",
            'id': '234'
          }
        }
      ]
    }
  ]
  
  const select = [
    "123",
    "456",
    "789",
    "234"
  ]
  
  const sort = people
    .filter(obj =&gt; obj["competences"].map(competences =&gt; competences['asset']['id']) !== select[0]) //['234'] !== '234'
    .map(
      (obj, i) =&gt; {
        return obj;
      }
    )
  
  console.log(sort)
  </code></pre>