From the given array of objects how to filter the expected output
let a = [{name:'Hari',age:2},{name:'Chana',age:4},{name:'Like',age:5}]
let b = [{name:'Chana',age:14},{name:'Like',age:15}];
I tried this but not working;
let c =a.filter(elm => b.find(el => el.name === elm.name));
expected output is [{name:'Hari',age:2}]