title: Get only specific values in array of objects in JavaScript
body: <p>I'm trying to get only two objects in the resultant array with label <code>one</code> and label <code>two</code>.
  How do I filter values in an array of objects. Could anyone please help?</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 arr = [{
      value: "1",
      label: "one"
    },
    {
      value: "2",
      label: "two"
    },
    {
      value: "3",
      label: "three"
    },
  ];
  
  arr.map((val, index) =&gt; val.filter(val.label =&gt; val.label === 'one' &amp;&amp; val.label === 'two'))
  
  console.log(arr)</code></pre>
  </div>
  </div>
  </p>
  <p>I was expecting an output like this below</p>
  <pre><code>[{
      value: &quot;1&quot;,
      label: &quot;one&quot;
    },
    {
      value: &quot;2&quot;,
      label: &quot;two&quot;
    },
  ]
  </code></pre>