cuál es la mejor manera de lograr lo siguiente:
export interface Iabc { startDate: Date | string | null; endDate: Date | string | null; nestedSection: { a: string | null; b: boolean | null; c: boolean | null; d: Date | string | null; }; }Actualmente estoy convirtiendo las fechas contenidas en las secciones anidadas así
nestedSection: Object.entries(values.nestedSection).reduce((prev, [k, v]) => { if (v instanceof Date) { return { ...prev, [k]: moment(v).format('YYYY-MM-DD'), }; } return prev; }, values.nestedSection),Sin embargo, necesito hacerlo para startDate y endDate un nivel superior a la sección anidada. AIT