I am looking to insert an Object into an array that already contains another array by inputting the ID into a textfield. Can someone guide me on utilizing methods with arrays within arrays?
Check out the demo here:
Below are the classes for reference:
class Food {
id: number;
name: string;
price: number;
type: string;
}
class Foodplan {
id: number;
foodPerWeek: number[] = new Array(5);
Any help would be greatly appreciated. Thank you!