Issue Explanation
Current data:
{
"field1": "value",
"field2": 3,
"field3": true,
"extraField": "toRemove"
}
An interface is defined as follows:
export interface MyInterface {
field1: string;
field2: number;
field3: boolean;
}
Objective
I am in need of converting or casting my current data to match the MyInterface (with the removal of extraField)
Avoid the Solutions Below
- Avoid deleting myData.extraField;
- Avoid using the .map() operator