Trying to remove a particular array value from an object. But it is not working. How to remove a array value from an object. If anyone knows please help to find the solution.
app.component.ts:
public obj = {
test1: ['j23', 'k54', 'm56'],
test2: ['j29', 'k34', 'm59'],
test3: ['j73', 'k94', 'm26'],
};
ngOnInit(): void {
delete this.obj['test1']['k54'];
console.log(this.obj);
}
Demo: https://stackblitz.com/edit/angular-ivy-ekhxjo?file=src%2Fapp%2Fapp.component.ts