Clouie Ckien

hi good day guys,
i'm having a trouble with fetching the data i have a list of folder outside like in the picture below

p1.png

when i click the first folder the picture below shows the output it has duplicates

p2.png

i want to know what's the problem with my code why it duplicates the folders. can someone help me out. please... thank you in advance

here's my code

c2.png

c1.png