{"2022-06-01": {"09:00am": {"time_table_id": 1,"job_id": 4,"start_working_time": "09:00am","end_working_time": "09:00pm","work_duration": "12:00:00","merchant_name": "Brands Outlet @ The Starling","address2": "Jalan SS 21/37, Damansara Utama","job_name": "Pro hero","job_application_status": "Hired" } },
and this is my schema but the zod error come out.
const apiScheme = z.object({ Date: z.object({ Time: z.object({ date: z.string(), time_table_id: z.number().nullable(), job_id: z.number(), start_working_time: z.string(), end_working_time: z.string(), // work_duration: z.string(), // merchant_name: z.string(), // address2: z.string(), job_name: z.string(), job_application_status: z.string(), }) }) }) const data = useMemo(() => { if (responseData) { const parseData = apiScheme.parse(responseData); if (parseData) { return parseData; } } return null; }, [responseData]);