let array = [
            {name: "60", origin: "tcs"},
            {name: "70", origin: "cfs"},
            {name: "80", origin: "ehg"},
    ]
undefined
let def = [
            {id: "60", testorigin: "tcs"},
            {id: null, testorigin: "cfs"},   // this line should be removed
            {id: "80", testorigin: "ehg"},
]
output
[
    {name: "60", origin: "tcs"},
    {name: "80", origin: "ehg"},
]
I just want to remove the second element of def because its id is null and its not matching with the name of array.
tried many way, but I failed, Thanks in advance.
 
     
    