I want to compare two objects and create a new one .If the property in one object is not there it should be replaced by other object otherwise should not change

1 Answers

0
androidGenX On Best Solutions
let result = this.monthobj.map(el=>{
    this.monthobj2.forEach(ele=>{
      if(el.month == ele.month && el.value != ele.value){
        el.value = ele.value;
      }
    })
    return el;
  })

Updated answer : Stackblitz