title: How to filter and map array of objects in JavaScript?
body: <p>I have an array of objects,<br>
  From which I want to conditionally create another array of objects.<br></p>
  
  <p>Eg. -<br></p>
  
  <pre><code>var devs = [
      {
          name: 'A',
          age: 26,
          tech: ['JavaScript','React'],
          addr:{
              country:'India',
              city:'Pune'
          }
      },
      {
          name: 'B',
          age: 25,
          tech: ['Node','AngularJs'],
          addr:{
              country:'USA',
              city:'NY'
          }
      },
      {
          name: 'C',
          age: 27,
          tech: ['React','AWS'],
          addr:{
              country:'UK',
              city:'London'
          }
      }
  ]
  </code></pre>
  
  <p>I want an Array of objects who have <strong>'React' in their 'tech' field array</strong>,<br> 
  And only want to display their Name and Tech,<br> 
  <strong>The following is the expected output -</strong><br></p>
  
  <pre><code>[
      {
          name: 'A',
          tech: ['JavaScript','React']
      },
      {
          name: 'C',
          tech: ['Java','React'],
      }
  ]
  </code></pre>
  
  <p>I know for conditional purpose filter method can be used,<br>
  But how do I leave out the unnecessary fields from the array of objects?<br>
  Can map method be used here? If so how do I implement it?</p>
  
  <p><strong>Following is my half cooked code -</strong><br></p>
  
  <pre><code>var filteredDevs = devs.filter(temp =&gt; temp.tech.includes('React'));
  </code></pre>