0👍
It looks like you are assigning the same array (timeslots) to all doctors.
When you add an element to the array for one doctor, you mutate the array that all doctors are sharing.
However with the little code you show, it’s difficult to know where is the exact problem.
Source:stackexchange.com