I have a requirement to compare the two object arrays and remove duplicate and merge them into a single one. I am kind of new to javascript/Typescript. I have read some blogs which are using Map, reduce,filter to do the job. Is that the right approach?
However, I am wondering if I can create a map of it and the Map.ContainsKey or Map.getvalues();
In the real problem, ojects are quite huge, has several keys and even array has hundreds of records.
[ { Name: Roger Country : spain }, { Name:Tiger Counry : USA }, { Name: Micheal Country: USA }, ] [ { Name: sachin Country : India }, { Name:Roger Counry : Spain }, ] output [ { Name: Roger Country : spain }, { Name:Tiger Counry : USA }, { Name: Micheal Country: USA }, { Name: sachin Country : India } ]