title: Map an array as per true or false set in another array
body: <p>I have an array of item "mockData" &amp; a Filter array "filter" in angular 8:</p>
  
  <pre><code>filter=[
  {column:"name",show:true},
  {column:"Sex",show:false},
  ];
  
  mockData=[
  {name:"test",sex:"m"},
  {name:"test2",sex:"m"},
  {name:"test3",sex:"f"},
  {name:"test4",sex:"f"},
  ];
  </code></pre>
  
  <p>I want to map only the columns of mockData which are set as true in filter array.</p>
  
  <p>result should look something like this.</p>
  
  <pre><code>[
  {name:"test"},
  {name:"test2"},
  {name:"test3"},
  {name:"test4"},
  ]
  </code></pre>
  
  <p>it should check in filter mandatorily.</p>