JSON.stringify(this.workout)is not stringifying the whole object. workoutis an object from the class Workout which looks like this:
export class Workout {
id: string;
name: string;
exercises: Exercise[];
routine: Routine;
}
Exercise and Routine is another Class with also nested arrays.
The problem is JSON.stringify(this.workout) return only {"name":"Day 1"}. Any ideas where the problem could be?
Workoutlooks like? This onethis.workoutI guess if you are not setting all the properties with some values - JSON.stringify ignores undefined stuff.JSON.stringify()does not ignorenull. It does ignoreundefined.